support version locks

based on this upstream pull request
https://github.com/MongoEngine/mongoengine/pull/276
I would add a comment here explaining that this is how we detect if there a conflict by making sure we select documents that have the version number we expect.