Fix the PING loop function

I started seeing clients get disconnected randomly for no conceivable reason, but then I realized: LoopingCall is not anywhere remotely close to consistent in how often it calls.  I added some debug statements and found that it can call anywhere from every interval (normal but uncommon) to every 4-6 intervals (quite common; not a lot of time, but enough to be problematic) to 9 or even 27 intervals (that happened once!).
This fix makes it correct for the number of times it didn't send PING when checking for the last PONG time.