state: make InferEndpoints take varargs

Most of the callers, usually the tests, were having to construct a []string, just to satisfy the contract of the method.

Make the method take a varargs ...string which is consistent with other Relation methods.
Allow streams version to be parameterised so that it can be different for images and tools metadata
Added versions to Agent API.
Added forgotten params.
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker
Fixed command not found error during tests on windows
Factor out a newBackupID function.
Add an alternate ID generator.
Add tests.
Serve charm archives from the API server

Charm archives are now stored in the blobstore,
and served over HTTPS. The uniter client is
modified to construct URLs using the API server
URL.
Migrate charm archives to environment storage on upgrade

We introdue a new database-master upgrade step which
migrates existing charm archives from provider storage
to environment storage. The final step of the migration
is to update the charm's document in state to record
the storage path.
api: move charms base URL construction to api/uniter
Address review comments
upgrades: read charms from disk in local/manual

Local and manual provider storage is httpstorage
layered on filestorage serving from a location
specified in agent config. The storage is served
by a "localstorage" worker, which does not start
until after upgrades complete. We shortcut the
httpstorage and go straight to disk if the provider
is local or manual.
Merge branch 'master' of https://github.com/juju/juju into agent-api-new-version-for-networker
Merge pull request #741 from axw/charms-environment-storage

Serve charm archives from the API server

Charm archives are now stored in the blobstore, and served over HTTPS.
The uniter client is modified to construct URLs using the API server URL.

We also introduce a new database-master upgrade step which migrates existing
charm archives from provider storage to environment storage. The final step
of the migration is to update the charm's document in state to record the
storage path.
Hook tool for sending metrics from charm.
Merge pull request #640 from tasdomas/metrics-in-hook-context

Hook tool for sending metrics from charm.

A hook tool metric-add is made available to charm authors for sending metrics to state.
implemented the sender worker for metrics
added test and comments after first round of reviews