Array as top-level BSON document

Serializing an Array should either throw an error, or produce output that can be deserialized into a proper Array. At the moment, the object produced by deserializing a serialized Array does not have the length key, and is not an Array.

See the added (failing) test for details.