Don't log heartbeat error messages multiple times

Addresses this ticket: http://manage.dimagi.com/default.asp?125687#717321

When CloudCare is open, the server is polled every 60 seconds. If you lose connection to the server an error message is displayed for each heartbeat. This change makes it so that that error message is only displayed once, instead of having them pile up on top of each other.
whitespace a little funny (would normally expect a space between the `)` and the `{` )