Add logic to self-tune the poll_interval based on available heartbeat info.

Fixes #1630