Fixed logging prefixes after moving state/api -> api/ and state/apiserver -> apiserver/
Merge pull request #659 from dimitern/fix-logging-after-api-move

Fixed logging prefixes after moving state/api -> api/ and state/apiserver -> apiserver/

After https://github.com/juju/juju/pull/655 got merged, I noticed some loggers are still using "state.api.*" and "state.apiserver.*", so this fixes these to drop the "state." prefix.

Also, added more logging to juju/testing/conn.go and state.Close() hoping to provide more context for fixing CI bugs like http://pad.lv/1348477.
Revert to using curl to download tools

aria2 is in universe, which would preclude
juju from entering main. aria2 is also not
available on the test machines, and broke
CI. Revert to using curl, but cycle through
the URLs until one succeeds.

Fixes https://bugs.launchpad.net/juju-core/+bug/1364438
Merge pull request #661 from axw/lp1364438-curl-download-tools

Revert to using curl to download tools

aria2 is in universe, which would preclude
juju from entering main. aria2 is also not
available on the test machines, and broke
CI. Revert to using curl, but cycle through
the URLs until one succeeds.

Fixes https://bugs.launchpad.net/juju-core/+bug/1364438
Implemented a cleanup worker for deleting any metrics that are over a
certain age
added comments and copyright
refactored metric doc to make it simpler. made some changes based on
review.
warning log instead of error in the cleanup worker
minor fixes after review
don't return errorresult, just return error
testing factory fixes
turn cleanup metrics into a bulk api call
minor fixes to error handling
added annotate to metric delete