json: add test for corrupted bson document in json conversion.

This enforces UTF-8 valid keys before calling visitors.