wip
Extracted machine agent test upgrade functionality

This is in prepartion for future tests which require the same
functions.
Fix test bug
Merge branch 'master' of https://github.com/juju/juju into fake-authorizer-takes-a-tag

Conflicts:
	state/apiserver/agent/agent_test.go
	state/apiserver/root.go
Remove commented out code
typo
remove debugging gre
provider/azure: sanity check cert

- Don't read an unbounded amount of data
  from management-cert-path, because users
  are prone to specifying the wrong file.
- Verify the contents are PEM.

Fixes https://bugs.launchpad.net/ubuntu/+source/juju-core/+bug/1250007
state: add Machine.WatchAddresses

Introducing a watcher for machine addresses.
We'll initially use this behind the API for
watching a relation unit's addresses, until
we have a document containing network-specific
addresses.

Also, don't update a machine doc's addresses
if they're already equal to what we want to
set them to.

Fixes https://bugs.launchpad.net/juju-core/+bug/1289815
Changed user to run mongo for admin
cmd/jujud: restrict API logins during upgrades

Use the recently introduced API login validation functionality to only
allow client and local machine agent logins while upgrade steps are
running. The goal is minimise database activity during upgrades,
specifically for schema migrations.

As well as the unit tests, this change has been heavily tested
manually.
responding to review feedback
Merge pull request #134 from axw/lp1289815-address-change-delta

state: add Machine.WatchAddresses

Introducing a watcher for machine addresses.
We'll initially use this behind the API for
watching a relation unit's addresses, until
we have a document containing network-specific
addresses.

Also, don't update a machine doc's addresses
if they're already equal to what we want to
set them to.

Fixes https://bugs.launchpad.net/juju-core/+bug/1289815
Merge pull request #144 from davecheney/fake-authorizer-takes-a-tag

Fake authorizer takes a tag
state/api/agent: Entity stores a names.Tag internally
state/api/machiner: store a names.Tag internally
more string -> names.Tag
more string -> names.Tag
remove another must method
remove another must method