MB-7092 Handle not utf8-encoded xdcr errors.
MB-7092 Handle not utf8-encoded xdcr errors.

When mochijson encodes strings, it expects them to be already
utf8-encoded.  And if it's not true, it fails with some
bad_utf8_character_code error.  In some cases errors that we get from
xdc_replictaion_sup might contain non-ASCII characters that are not
properly encoded. For example if it's just a pretty-printed stacktrace
referring to some document body.  We'll just keep 7 least signi
significant bits of every character to make it look like proper
ASCII. We don't really care that we'll get some garbage because the
messages are already very far from being human-readable.

Change-Id: I2a5addcb68b95d3176127de98c6311ceee8932be
Reviewed-on: http://review.couchbase.org/22278
Tested-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>
Tested-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>

membase/ns_server,membase/ns_server,membase/ns_server,daverigby/ns_server,t3rm1n4l/ns_server,nimishzynga/ns_server,membase/ns_server,membase/ns_server,t3rm1n4l/ns_server,mschoch/ns_server,ceejatec/ns_server,mschoch/ns_server,t3rm1n4l/ns_server,pavel-blagodov/ns_server,vzasade/ns_server,ceejatec/ns_server,vzasade/ns_server,nimishzynga/ns_server,ceejatec/ns_server,daverigby/ns_server,nimishzynga/ns_server,pavel-blagodov/ns_server,daverigby/ns_server,mschoch/ns_server,vzasade/ns_server,mschoch/ns_server,membase/ns_server,t3rm1n4l/ns_server,vzasade/ns_server,mschoch/ns_server,ceejatec/ns_server,daverigby/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,t3rm1n4l/ns_server,nimishzynga/ns_server,pavel-blagodov/ns_server,ceejatec/ns_server,mschoch/ns_server,ceejatec/ns_server,pavel-blagodov/ns_server,daverigby/ns_server