We have some fields that we assign but do not declare. By including Mongoid::Attributes::Dynamic, we tell mongoid to allow us to use fields that are not declared on the model.
Alias fields the mongoid way instead of using the alias command.
Update location of BSON.
In the mongoid 3 gem, running insert on a blank array returned a nil. On the mongoid 4 gem, running insert on a blank array causes a error 13066: "Message contains no documents". If we only run insert when bulk is not empty this fixes the issue.
Mongoid 4 does not seem to handle id overrides the same as Mongoid 3 does. setting field :id, as: :id seems to have allowed us to work around this issue as long as we use self['id'] when referencing our internal ID and any other when trying to get the mongo _id.
Database tasks have been moved outside of the rake module.

https://github.com/mongoid/mongoid/commit/4e0d211f73f63b7932f53ab5140a8609256b10f5
include Mongoid::Attributes::Dynamic on additional models which need it.
Merge pull request #122 from rbclark/experimental_mongoid4

Fix issues causing test suite to fail.