juju/juju — pull request #167 by axw (2014-06-26 10:01:02+00:00)
Title: 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