Bump mongoid to version 4 and bump versions of all gems that have the same dependencies.
Rename Moped::BSON to BSON since bson was moved into its own gem and is no longer a part of Moped.
Workaround an issue in mongoid 4 where id does not return the same thing as it used to return. It now returns the same as _id unless you explicitly tell it otherwise.
Calling BSON::ObjectId(:id) doesn't work anymore, have to use from_string method.
Fix duplicated field declaration in quality measure model.
Update Gemfile.lock to latest versions.