added __slots__ to BaseDocument and Document
changed the _data field to static key-value mapping instead of hash table
fix tests to work with strict _data in documents