Fixing two more crashes in cbson.
Merge branch 'master' into replication
Fixing return value and test.
Cleaning up test.
Fixing compilation warning on bad type.
Fixing format.
Merge branch 'bson'