Empty document is not saved correctly
Brought to you by:
dtylman
When an empty document is saved in DataCollection::saveTo, sstream.tellp() returns -1 because nothing is written to the string stream. This results in an error when the document is send to MongoDB, because it sends the wrong length to the server (DOCUMENT_STATIC_SIZE + sstream.tellp() is 4, while it must be 5)