Revert "Revert "wip""

This reverts commit e99ce665514256dfb6605a09f61543f00f6b7452.
Revert "Revert "wup""

This reverts commit 5aeb2f4a85adf562c95c33541862abe777b3eafe.
Revert "Revert "wip""

This reverts commit 87ee69ec5174646b0c6382c89ee09f2f68544f98.
wip
Merge branch 'master' of https://github.com/juju/juju into 155-pass-environment-uuid-via-config-rather-than-generate-on-the-server

Conflicts:
	state/open.go
state: if no cannot provide a uuid, one will be assigned to you by the court
Moved uuid insertion to environs.prepare
final text tweak
Merge pull request #403 from davecheney/155-pass-environment-uuid-via-config-rather-than-generate-on-the-server

state: pass environment uuid via config rather than generate it during initialize

In order to have the uuid of the environment available _before_ state is initialised the uuid is now a part of the environment configuration.

This PR also contains some drive-by cleanups to state tests to make them more robust if they fail.