Support mongoid4 alpha

Support mongoid4 alpha. This has a lot of duplication between mongoid 3 and 4 that should be removed before merging. Let me know if you are interested and I'll refactor.