Support Mongoid 3.x

Here are tweaks to support Mongoid 3.x (and the new Moped driver).