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.
make the WaitGroup a local var, which leaves the tests passing, and avoids the possible race condition.
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