Skip unreliable ipv6 test
Added opened ports watcher; allow opening/closing port ranges on units
Merge pull request #739 from dimitern/state-openedports-watcher

Added state opened ports watcher; allow opening/closing port ranges on units

Taking over the work Domas did in https://github.com/juju/juju/pull/517 and splitting this, 
as requested by reviewers in 4 chunks. This is 1/4 and is only
about changes in the state package.

Ports opened on a unit are now migrated to the openedPorts collection
on subsequent OpenPort/ClosePort calls, but the Ports list on the
unit document is not reset yet, as it's better done in a follow-up
one in an upgrade step.

Next: 2/4: upgrade step to migrate ports from units to openedPorts
collection; 3/4: firewaller api changes to enable watching ports;
4/4: firewaller worker using the new api.
Merge pull request #740 from voidspace/skip-ipv6

Skip unreliable ipv6 test

replicaset/replicaset_test : skip unreliable test due to mgo issue

Due to a bug in mongo, now fixed in 2.7.4, when creating replicasets with ipv6 we must specify the address in the form "::1:port", not the more correct "[::1]:port".

https://jira.mongodb.org/browse/SERVER-5436

mgo, in resolveAddr (in cluster.go, called from syncServers), calls net.DialTimeout which fails with "too many colons in address" when we use this format.

This is filed as issue 22 in mgo https://github.com/go-mgo/mgo/issues/22

Until this is resolved the test is skipped.
Expose AbortCurrentUpgrade over the API

This will be used by the user to clear the synchronisation document
for a previously failed upgrade (via an arg to "juju upgrade-juju").
drive-by: moved serverSuite

serverSuite and it's methods was sitting in the middle of
clientSuite. This was a tad confusing.
Merge pull request #738 from mjs/AbortCurrentUpgrade-api

Expose AbortCurrentUpgrade on API

This will be used by the user to clear the synchronisation document for a previously failed upgrade in the rare case of a partially completed upgrade.
api: api no longer depends on state.

As part of a previous refactoring I accedently made api directly dependent on state, which is an even worse crime than state depending on the apiserver.

This proposal corrects this mistake and removes all dependencies on state from the api packages, along with additional removals of direct dependencies on state.

The cost is the agent package is responsible for translating between params.StateServingInfo, which is effectively the public data type of state information, and state.StateServingInfo which is the state's own version of the same.
state/toolstorage: remove old blob on update

If AddTools encounters existing metadata, it
will now attempt to remove the old blob. If
it fails to do so, an error will be logged
but not returned.
state: split toolsmetadata constant from others

Tools metadata does not represent entities in
the system like the other state collections.
Split it off like backups metadata.
Improve test coverage
Remove debugging printf
Merge pull request #710 from axw/state-toolstorage-addtools-remove-old

state/toolstorage: remove old blob on update

If AddTools encounters existing metadata, it will now attempt to remove the
old blob after adding the new one. If it fails to remove the old one, an error
will be logged but not returned.
Merge pull request #743 from davecheney/199-make-api-not-dependent-on-state

api: api no longer depends on state.

As part of a previous refactoring I accedently made api directly dependent on state, which is an even worse crime than state depending on the apiserver.

This proposal corrects this mistake and removes all dependencies on state from the api packages, along with additional removals of direct dependencies on state.

The cost is the agent package is responsible for translating between params.StateServingInfo, which is effectively the public data type of state information, and state.StateServingInfo which is the state's own version of the same.