bson: make sure we set the \0 for end of document.

Includes a test for recursively built BSON documents.