Make Heartbeat Interval Configurable

The python version of this library allows the configuration of the heartbeat interval while this one has it hardcoded to 5000ms. 

This PR allows the configuring heartbeatInterval in the client and server.