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
agent: dump UnitStatePublisher cache on SIGUSR1
Merge pull request #849 from bcwaldon/usp

Refactor UnitStatePublisher