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.
Merge branch 'master' of https://github.com/juju/juju into migrate-settings

Conflicts:
	state/upgrades_test.go
	upgrades/steps121.go
Merge branch 'master' of https://github.com/juju/juju into migrate-settings
Merge pull request #1065 from waigani/migrate-settings

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.