Pre-process mutations to optimize table modifications.

Database mutations are now pre-processed in order to filter out
mutations that ultimately have no effect on the database, or those that
can be easily combined into earlier mutations.

Lists of mutations are first divided up into batches of mutations that
can be considered together (AddField, ChangeField, RenameField,
DeleteField, basically). Each batch is then processed for a number of
optimizations.

The optimizations include:

* Removing all mutations for a batch that both adds and deletes a
  particular field, which would otherwise result in an expensive
  no-op on the table.

* Removing all mutations operating on a field that's later deleted in
  a DeleteField.

* Condensing multiple ChangeFields in a batch together into one
  ChangeField.

* Condensing all changes made by ChangeFields for a field into the
  AddField that introduced the field, if an AddField is present in the
  batch.

* Condensing multiple RenameFields in a batch together into a single
  RenameField.

* Removing all RenameFields and changing the field name for an AddField
  when both are present in a batch.

This can reduce the time needed for evolutions by a fair amount,
particularly when upgrading an older database with many changes pending.