added __slots__ to BaseDocument and Document
changed the _data field to static key-value mapping instead of hash table
This implements #624
Merge branch 'master' into pr/625