Fix the ._get_db() attribute after a Document.switch_db()

Without this patch, I've got:

```
myobj._get_db()

<bound method TopLevelDocumentMetaclass._get_db of <class 'oneflow.core.models.nonrel.Article'>>

```

I need to `myobj._get_db()()` to get the database.

I felt this like a bug.

regards,
permit the establishment of a field with the name of size or other

Example:

# model
class Example(Document):
    size = ReferenceField(Size, verbose_name='Size')

# query

examples = Example.objects(size=instance_size)

# caused an error

"""
File ".../mongoengine/queryset/transform.py", line 50, in query
if parts[-1] == 'not':
IndexError: list index out of range
"""
Merge pull request #441 from Karmak23/patch-1

Fix the ._get_db() attribute after a Document.switch_db()
Dynamic Fields store and recompose Embedded Documents / Documents correctly (#449)
Merge branch 'master' of github.com:MongoEngine/mongoengine
Update AUTHORS and Changelog (#441)
Fixed slice when using inheritance causing fields to be excluded (#437)
Fix Queryset docs (#448)
Updated setup.py
Fixed dereference issue with embedded listfield referencefields (#439)
Updated field filter logic - can now exclude subclass fields (#443)
Merge remote-tracking branch 'origin/pr/445'
Allow fields to be named the same as query operators (#445)
Fixed "$pull" semantics for nested ListFields (#447)
Update travis.yml
Added documentation about abstract meta

Refs #438
Fixed error raise