bson: add API and unit test for inline sub-document building.
bson: implement bson_append_document_begin() bson_append_document_end().

This helps by allowing the consumer to have a single realloc'able buffer
for building a series of embedded BSON documents.

The basic test passes, but many many more are needed.