state/machine: use WaitAgentPresence, rename AgentAlive
state/machine: StartSync in SetAgentPresence
state/machine: check IsManager and only Sync presence watcher
presencer: make the presencer interface official
state/presence: fixing issues from review
Close the state connection, and run the tests.
We shouldn't attempt to UTC a zero time.
Merge pull request #2 from wwitzel3/010-bootstrap-ensure

state/machine: use WaitAgentPresence, rename AgentAlive

Using WaitAgentPresence after SetAgentPresence gives time for the first write of the pinger data to mongo to be persisted. This fixes issues with juju status and ensure-availability being run in quick succession with juju bootstrap.
Merge pull request #110 from howbazaar/fix-factory-tests

Actually run the factory tests.

Forgot to hook up the actual tests.

Running them raised a few issues, fixed here.
 * closing the state connection
 * making sure the timestamps returned from the state.User are in UTC