Made changes to the KeepAlive Feature as per code review feedback

- Added an Interlocked Exchange variable to Beat in HeartBeatMonitor to prevent race conditions
- Added a null-check before starting the HeartBeatMonitor in Connection to prevent null exceptions

#741