MB-12099 Handle unicode:characters_to_binary errors.

Change-Id: I1f327d54569bb9ab7a4db6d0ff1be2dacde779da
Reviewed-on: http://review.couchbase.org/41096
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>