state/{api,apiserver}: don't leak heartbeat goroutine

- In api.State.Close, signal and wait for the heartbeat
  goroutine to stop before returning.
- Add various missing api.State.Close calls to apiserver
  tests.

Fixes https://bugs.launchpad.net/juju-core/+bug/1334531
Merge pull request #167 from axw/lp1334531-dont-leak-apistate

state/{api,apiserver}: don't leak heartbeat goroutine

- In api.State.Close, signal and wait for the heartbeat
  goroutine to stop before returning.
- Add various missing api.State.Close calls to apiserver
  tests.

Fixes https://bugs.launchpad.net/juju-core/+bug/1334531
update dependencies.tsv to use new names version
use earlier names dependency
Merge pull request #177 from rogpeppe/011-update-names-dep

update dependencies.tsv to use new names version

We want to be able to use the new stuff there.
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
Now correctly mocks up bad API for apiserver test of bad unit query
Addressed PR comments
Merge pull request #140 from binary132/actions-uniter-api-action

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.
Merge remote-tracking branch 'upstream/master' into 122-state-machine-watchinterfaces
enable dynamic network interfaces