Persist pingHeartbeat after pingLoop finishes

* We weren't persisting the current heartbeat after the loop finishes,
  so we'd end up starting next time with the default start heartbeat
* The new code is a bit more efficient, as we'd start the next pingLoop
  with the heartbeat previously in effect

Bug: 2492854
Change-Id: I1d488e3eb05530c452605b25108b35af582e692f
1 file changed