allow write_attribute to work with an aliased field name
Update changelog
Reset descendants' cache when new one is created

If ._types method had been called before declaration
the subclass, Factory.build method will not be able
to create object of its subclass.
Refactor and add note to changelog
Remove double creation dirty reset method

This double call was added by this commit
bfb4a2860df50ad09d53e3a3d235e2fee2fcecca
Update changelog
Documentation fix
Use sane defaults in the mongoid.yml for retries in the test env
Update changelog
Fix broken rails g mongoid:config. [ fix #2463 ]
it's to its
Properly remove embedded docs in as_document.

In the case of a relation existing in the attributes hash and then
getting set to empty, this now allows the attributes to properly get
reset.

[ fix #2454 ]
Nullified documents can be re-added to a relation.

[ fix #2469 ]
Adding specs (passing) for #2462
Ensure update_all does not error if nothing to update

[ fix #2472 ]
Embedded paranoid document deleted scope fixed.

[ fix #2451 ]
Don't fail on embedded pagination out of range

When skip or limit criteria are provided to an embeds_many relation
criteria that is out of range of the documents, we should simply return
an empty array.

[ fix #2476 ]
Removing indexes always uses strong consistency. [ fix #2485 ]
Store find params in DocumentNotFound errors. [ fix #2482 ]
Handle batch state passing in M/R aggregations

Mongo batches reduce jobs in groups of 100 and passes the state along
via the first document each time in the reduce function. This was
causing the count in the aggregations to reset every 100 documents that
were passed through the reduce. The effect would throw off any
calculations for avg and count with result sets larger than 100 docs.

[ fix #2482 ]