Various libunit fixes.
Various libunit fixes.

This patch contains various logging improvements and bugfixes found
during Java module development.

nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit