Move charm archive logic to API server

The client no longer determines the charm archive URL
from the current API server address, but instead queries
the API server for a list of URLs to attempt. The uniter
will try each URL until one works.

Fixes https://bugs.launchpad.net/juju-core/+bug/1394976
Block/unblock remove- commands and tests.
Fixed environs
Merge pull request #908 from bogdanteleaga/environs

environs: fixes for Windows

This PR makes some transparent changes to implement filestorage on windows.

We cannot write files with : on the disk so we write everything with a -. This also means that anything that's read from the disk also has to contain dashes.

Depends on https://github.com/juju/utils/pull/45
Bring in new juju testing.
Merge pull request #1212 from axw/lp1394976-api-uniter-charmarchiveurls

Move charm archive logic to API server

The client no longer determines the charm archive URL
from the current API server address, but instead queries
the API server for a list of URLs to attempt. The uniter
will try each URL until one works.

Fixes https://bugs.launchpad.net/juju-core/+bug/1394976

(Review request: http://reviews.vapour.ws/r/522/)
Replace the asserts.
Use jc.IsTrue and jc.IsFalse
Don't fail horribly if not a state server.
Merge master.
Block operation before validating it. Remove redundant tests.
Remove the import.
Move the job start to the api server part.
Made error msg explicit and cleaned up some tsts.
Merge pull request #1219 from howbazaar/jc-errorisnil

Update testing dependency and use jc.ErrorIsNil

Replaced all occurrences of
    c.Assert(err, gc.IsNil)
with
    c.Assert(err, jc.ErrorIsNil)

Also replaced `c.Check` variants.

While I was making such a massive change, I also changed:
     gc.Equals, true)
to
     jc.IsTrue)

and
    gc.Equals, false)
to
    jc.IsFalse)

(Review request: http://reviews.vapour.ws/r/528/)
Merge pull request #1220 from howbazaar/fix-system-identity-writer

Don't fail horribly if not a state server.

The agent code still fails, but with a specific error code if it is missing.
The call site is then able to be intelligent.

(Review request: http://reviews.vapour.ws/r/529/)
Added tests to check msg is logged. Cleaned up comments, renamed method for clarity and removed redundant tests.
Organised imports.
Block/unblock remove- commands and tests.
Block operation before validating it. Remove redundant tests.