Fix bug #1333098. Concurrent access to the objectCache needs to be protected by a mutex.

While there, I discovered a difference race condition in the api Watcher code.
So I fixed that in passing.

The new test fails if you run under '-race', and the tests in cmd/jujud/*TestMachineAgentRsyslog* used
to fail with the race detector and now pass.
all api life methods take names.Tag
make the WaitGroup a local var, which leaves the tests passing, and avoids the possible race condition.
Merge branch 'master' of https://github.com/juju/juju into 112-state-life-takes-a-tag
state methods take a tag as a string, not an id
Fix test failure
Do not allow the peergrouper worker to publish empty/nil api server addresses
Merge pull request #153 from davecheney/112-state-life-takes-a-tag

api, apiserver: internal life methods now take a names.Tag
Merge pull request #155 from wallyworld/peergrouper-publish-ignore-empty

Do not allow the peergrouper worker to publish empty/nil api server addresses

This is an attempt to fix bug https://bugs.launchpad.net/juju-core/+bug/1333682

Something is writing empty api server addresses to state, which are then propagated to the machine agents, which then update the agent.conf file and boom, the apiaddresses entry is deleted. So I've disallowed the peergrouper worker from publishing empty addresses.
Merge pull request #146 from jameinel/api-concurrent-caching-1333098

Fix bug #1333098. Concurrent access to the objectCache needs to be protected.

We add a Mutex around the objectCache map.

While there, I discovered a difference race condition in the api Watcher code.
So I fixed that in passing.

The new test fails if you run under '-race', and the tests in cmd/jujud/*TestMachineAgentRsyslog* used
to fail with the race detector and now pass.
Uniter Action(id string) API client/server

This commit adds the ability for Uniter clients to query Actions from
state.State by id.  The response includes a server error message if the
Action is not present on the state server.
Test improvements/tweaks
API server Actions is now a batch query.
Check for unit access before querying database
Addressed concerns in Action API PR 140
Action query now uses tags over the wire
Action API query now properly checks validity of request and exercises
error cases