Support encoding of binary "bytes" fields

protobufs internally treat these fields as strings, but jansson hickups on trying to convert arbitrary binary into a string, and silently discards the field. 

This patch adds a simple wrapper that hex-encodes the that if the field is of TYPE_BYTES. This way, the JSON is printable, and binary bytes fields can be preserved (although they will have to be re-encoded if ever put back into a protobuf).