agent: remove unnecessary sleep from tests
Merge pull request #829 from jonboulle/agent_tests

agent: remove unnecessary sleep from tests
registry: remove unused Units from FakeRegistry
job: unexport Requirements

There's no need for anything outside the package to access Requirements
directly; they should only be using the associated wrappers (e.g.
Peers(), Conflicts(), etc).
Merge pull request #832 from jonboulle/job_requirements

job: unexport Requirements
agent: further work towards purging "Job" terminology

- Update agent.loadJob/startJob etc
- Switch taskChain to job.Unit
- Update task reasons
- Update tests
agent: further job-removal work

Simplify currentAgentState dramatically; all it really needs is a
mapping from unit names to their states, so switch to that.

Rename and modify agent.jobs() --> agent.units() accordingly.
agent: move AgentState entirely from Jobs to Units

As the title implies - AgentState (used by the agent reconciler for
desiredAgentState and also by the engine for clusterState) now uses
job.Unit instead of job.Job.

To facilitate this in the short term, Unit gains some of Job's methods
and simply wraps a Job to provide them. This will disappear as Job is
removed.
Merge pull request #831 from jonboulle/reg

registry: remove unused Units from FakeRegistry
docs: clarify multiple x-conflicts per unit
Merge pull request #834 from robszumski/master

docs: clarify multiple x-conflicts per unit
*: assorted minor issues identified by go vet
agent: remove unnecessary manager from state publisher
log: stderr, not stdout

Fix #841
Merge pull request #839 from jonboulle/reg

agent: remove unnecessary manager from state publisher
doc link update
Merge pull request #844 from igm/patch-1

doc ref link update
Merge pull request #843 from bcwaldon/841

log: stderr, not stdout
registry: fix state-related bugs in FakeRegistry
agent: refactor UnitStatePublisher locking + timing

- rename addToCache --> updateCache
- split logic in publishAll into pruneCache and Run
- add test coverage for updateCache & pruneCache
- updateCache checks if state existed previously in cache and if not,
  publishes immediately (i.e. considers it a change)
- Run waits TTL/2 between publishing entire state
- Run only locks the cache to copy it; no longer holds lock while
  publishing to etcd