Add HeartbeatHandler

Add the `HeartbeatHandler` and associated `register_callback` function.
Update style

Update style to match `Sprockets` conventions.
Merge pull request #1 from sprockets/add-heartbeat-handler

Add HeartbeatHandler