Represent non-printable characters as \uxxxx.

When non-printable characters appear represent them, in a more
readable form. This avoids having to inject 16-bit characters into the
JSON, and hence the associated confusion with the encoding to be used
for Python generated strings.