Fixes #5579: Implement heartbeat mode

I'm really not a fan of the duplication introduced here. This dupliactes a REALLY COMPLICATED LINE!

Please fold this back to avoid duplicating the line. The class expression will be more complicated (well, actually shorter overall, so not too bad), and defining the start_heartbeat_sent class in non full_compliance mode is not a problem.