bson: Fix block size detection for documents, arrays and binary data.
bson: Fix block size detection for documents, arrays and binary data.

Due to casting mistakes, only the first byte of the sizes were counted
instead of all four, leading to interesting bugs.

Exposed by the new testcase added earlier.

algernon/libmongo-client,algernon/libmongo-client,algernon/libmongo-client