Fix migration failures on upgrade and rollback

This fixes two separate issues with the generated migrations:

* A failure on upgrade from 2.0.4 to 3.4.1 (index name change causes issues)
* A failure to rollback the AddGcm migration successfully due to operation ordering