Don't try to reconnect when we are still connected
bindVisibilityChange reorder arguments
Disconnect/connect on pageshow/pagehide

Using the pagehide/pageshow events we now disconnect/connect on devices
that don't have the Page Visibility API. This works perfectly on the iPhone,
but not on the iPad, even though they both run the same iOS version. Let's
hope they catch up with the Page Visibility API soon.