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 get afraid whenever `default` isn't the last block in the switch statement. For no reason, I guess. Will change. Thanks!