Wraps a closure as a HeartbeatTimeoutHandler, allowing per-component custom behaviour to be
defined inline in main.rs without needing a dedicated struct.
Called by the sender on every heartbeat tick where a target has not responded within
response_timeout_ms. Fires repeatedly while the target remains silent.