Fix bug in upgrade test

oldID is converted to a string. Which is different to the the bytes
version stored in the document.
Merge branch 'master' of https://github.com/juju/juju into fix-upgrade-bug
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.
Runner now uses an interface, not a *HookContext; Flush is ~properly tested locally; Run* is ~properly tested by using the Context interface
consolidated yuckiness in HookContext.ActionData method
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.
Merge branch 'master' of https://github.com/juju/juju into fix-upgrade-bug
Merge pull request #1011 from waigani/fix-upgrade-bug

Fix bug in upgrade test

oldID is converted to a string, which is different to the the bytes
version stored in the document.
Stop trying to use DNS name for ec2 public addresses
Drive by format fix
upgrades: moved Step and Context to their own files

In preparation for upcoming changes where State requiring upgrade
steps will be separated from API requiring ones.

Also removed unused "db" and "runner" fields from upgradeContext.
upgrades: introduce StateStep

It's now part of the Operation interface, but not used yet.
upgrades: StateSteps are now run as part of upgrades

All StateStep upgrade steps for a target are now run before other
upgrade steps. Existing migration steps still need to be migrated and
there's a number of cleanup steps required before this work can be
considered done.
upgrades: migrated steps that manipulate state directly to be defined as such
upgrades: introduced APIContext

This is a limited upgrade context give to upgrade steps that use only
the API. Existing steps like that have been updated to take APIContext
instead of Context.
upgrades: test refactoring

Extracted the common parts of mockStateUpgradeStep and
mockUpgradeStep, making the targets() helper unnecessary in the
process.
upgrades: various changes based on review feedback

The crux of this change is that the role of StateContext and
APIContext have been taken over by the base Context interface. This
also allows for a single step interface which allows for
simplifications throughout.
upgrades: completely separate state and API based steps

These 2 types of steps are now defined in separate lists. This makes
the package even simpler and allows further simplification.