State Upgrade steps: Add EnvUUID to settings and settingsRefs

Add two upgrade steps which prepend the environ uuid to the _id field
of the settings and settingsRefs collection. Refactor TestChange in
megawatcher_internal_test.go to allow test cases to be configured with
a state instance (the refactor also removes about 100 lines of code).
Refactor state/upgrades_test.go to support collection specific
overriding of the generic checkAddEnvUUIDToCollection and
checkAddEnvUUIDToCollectionIdempotent.