Add support for NGHeartbeatListeners and configurable heartbeat timeout