check for connection when browser goes online / offline

* * *

This week of work on @hoodiehq is sponsored by Cargo Media.

   Their slogan is “Small Team, Big Impact” and they are hiring
   a Frontend and Backend Dev: http://go.hood.ie/cargo-media
check connection on initialization. This makes hoodie send a GET / every 30s. If one fails, it triggers "disconnected" and starts sending GET / every 3s. If one succeeded, it triggers "reconnected"

* * *

This week of work on @hoodiehq is sponsored by Cargo Media.

   Their slogan is “Small Team, Big Impact” and they are hiring
   a Frontend and Backend Dev: http://go.hood.ie/cargo-media