Add MongoDB adapter

This pull request adds support for MongoDB :smile: The code passes the test suite, but has not been tested in the wild yet and is still missing locks. Thought I'd put this here for discussion and feedback.