Extracted machine agent test upgrade functionality

This is in prepartion for future tests which require the same
functions.
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.
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
remove another must method
Merge pull request #147 from perrito666/1332110_restore_broken_with_mongo_refactor

Fix bug #1332110 :restore fails on hp and aws

After a change on how permissions are handled for users (240db2a2), the one executing mongo queries on the restore process became unable to run them. This operations seems to lack a permission failure.
The operation is now run, as others already where, as admin user.
Merge pull request #142 from mjs/client-logins-during-upgrades

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.
Fix compiler crash
gofmt
Merge pull request #151 from davecheney/113-fix-gccgo-crash

Fix compiler crash
environs/instances: expose getMatchingInstanceTypes

The azure provider has some custom instance-type
matching code which can be made to use this function
if it's exposed.
Merge pull request #148 from axw/environs-instances-matchinginstancetypes

environs/instances: expose getMatchingInstanceTypes

The azure provider has some custom instance-type
matching code which can be made to use this function
if it's exposed.

Also, move instance-type constraint matching into `MatchingInstanceTypes` and friends, simplifying `FindInstanceSpec`.
Merge pull request #145 from davecheney/111-api-params-takes-tag

params.Entity preparations

This PR is a grab bag of changes aimed at isolating all the places where we pass a string to params.Entity and convert them into taking a names.Tag. 

This PR isn't complete, there is still more work to be done before params.Entity.Tag can be made into a names.Tag, but it is a good checkpoint as it gets rid of all the mustParseXXX methods added in a previous PR.
provider/azure: simplify role size selection, report hardware, fix costs

- Use the newly exported environs/instances.MatchingInstanceTypes
  to simplify instance type selection when force-image-name is used.
- Update role costs and role sizes (bump gwacl rev).
- Emit hardware characteristics by converting gwacl.RoleSize to
  instance.HardwareCharacteristics.

Fixes https://bugs.launchpad.net/juju-core/+bug/1215177
Merge pull request #152 from axw/azure-instance-types-update

provider/azure: simplify role size selection, report hardware, fix costs

- Use the newly exported environs/instances.MatchingInstanceTypes
  to simplify instance type selection when force-image-name is used.
- Update role costs and role sizes (bump gwacl rev).
- Emit hardware characteristics by converting gwacl.RoleSize to
  instance.HardwareCharacteristics.

Fixes https://bugs.launchpad.net/juju-core/+bug/1215177