agent: remove restart command

Other, somewhat random changes:

- Clarify agent/container heartbeat state machine transitions
- Naming convention stuff (request channels in container)
- Code style stuff (all over the place)

Takes over from PR #11. Addresses issue #4.
I think this should be FORCEDOWN; this check handles the case that the agent receives heartbeats from a container it doesn't know anything about. The container sending heartbeats could be holding onto untracked resources, and might never exit gracefully.