Mongoid 3

I've merged in the latest commit, which is substantial. 

I don't know what you're doing as far as testing goes, so I haven't tried to test anything. If I find anything broken, I'll update this PR. 

Of course, what I did is rather simple so you could just do it yourself and delete this PR when you get around to it, but if this is helpful, feel free to merge.