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
Addresses are added to certificate, and consistency checks required when saving
Fixed lp:1395908 - disabled NICs from lshw stay disabled
When writing metadata, copy any released metadata to the legacy index file
Merge pull request #1249 from wallyworld/generate-old-simplestreams-index

When writing metadata, copy any released metadata to the legacy index file

Fixes: https://bugs.launchpad.net/juju-core/+bug/1396981

The legacy index.json file needs to be written out to contain any released metadata. This allows the current release scripts to work.

(Review request: http://reviews.vapour.ws/r/560/)
Merge pull request #1247 from dimitern/lp-1395908-respect-disabled-lshw-nics

Fixed lp:1395908 - disabled NICs from lshw stay disabled

With this fix the MAAS provider takes the disabled="true"
attribute of <network/> elements into account when deciding
which should be the primary network interface on the machine.
The end result is juju-br0 will be configured to use the first
enabled network interface.

Live tested on MAAS.

(Review request: http://reviews.vapour.ws/r/558/)
Add a test for missing files.
Make the logs optional.