json: add bson_array_as_json()

This allows BSON documents to be formatted as top-level [] if it is such
desired. Unfortunately we can't determine this automatically at the
top-level when working with raw encoded bson buffers.

Thanks to Itay Neeman at Splunk for the patch!