COUCHDB-1158 - Allow Unicode in in log messages. This is a hand crafted backport of 1101896 from trunk because the logger has had many other changes.