Ports DB connection to mongoengine and adds lots of tests
Merge pull request #1363 from bmbouter/US3029

Ports DB connection to mongoengine and adds lots of tests