State upgrade step: add env UUID to openPorts collection

Add an upgrade step targeting 1.22-alpha for the openPorts collection. Append the State Environment UUID to the document _id field. Add the following fields to the document: "env-uuid", "machine-id","network-name".

Refactor state/ports.go to use the new fields. Refactor mgo queries to included the environment UUID. Refactor state/upgrades.go helper function addEnvUUIDToEntityCollection to support collection specific upgrades by using variadic option functions. Skip failing upgrade tests which do not target current version.
Checkpoint for collaboration

The leadership service endpoints have been defined so that others can begin writing against the API. Currently everything else is stubbed out.
Merge branch 'master' into leadership
Merge branch 'master' of https://github.com/juju/juju into migrate-openPorts

Conflicts:
	state/upgrades.go
Merge branch 'master' of https://github.com/juju/juju into migrate-openPorts

Conflicts:
	state/upgrades_test.go
	upgrades/steps122.go
	upgrades/steps122_test.go
worker/diskmanager: don't publish disk partitions

Don't publish partitions to state. Partitions may not be used
as there is no guarantee that the partition will remain available
(and we don't model hierarchy). Also, we will likely be using
partitions at least in some scenarios to synthesise a unique
identifier for block devices which can't otherwise be guaranteed.
move context inside runner -- integration tests still passing, nothing else even checked
fix context package tests
fix uniter/operation tests
State: add EnvUUID to statusDoc

Add State's environment UUID to the EnvUUID field of a statusDoc on creation.
rename uniter/context to uniter/runner
Regenerate state server certificate to update SAN attribute with machine IP addresses
Merge branch 'master' into uniter-deemphasise-context
added support for setting metric credentials on the service

removed credentials from metric to metricBatch
Addresses are added to certificate, and consistency checks required when saving
renamed updatemetriccreds to set, added test, other review comments
Implemented changes from reviews.

- Mostly godoc tautological comments.
- Reorganized imports.
- Moved params from apiserver/leadership to apiserver/params namespace.
- Removed bulk oriented calls from client API as they are not yet needed.
- Annotated errors from making facade calls in the client API.
- Now checking that stubbed-out functions are being called.
- Now checking that service and unit tags are correct.
- Cleaned up error messages.
- Upon starting, the lease manager was not checking existing leases for expiration.
- Giving the lease expiration test slightly more wiggle-room in regards to timing.
- Added TODO in state.go to reflect that leasemanager should eventually be peeled off.
- Added tests to the apiserver layer to test authorizer errors.
Block all changes.
Added user commands and refactored common code for readbility
No need to store sevrer cert in state - it is generated on each state server