Add support for heartbeat commands.

See also https://github.com/mozilla/captain/pull/21