Support mongoid 4

It's a new pull request against develop branch.