Disconnect/Connect depending page visibility

Using the PageVisibility API we now disconnect (and stop polling if we are the
last client) when the page is not visible anymore (e.g. switched tab). We
reconnect as soon as the page is visibile again.

This should work for all modern desktop browsers (Firefox >= 18, Chrome 13,
IE10) and some mobile browsers (Chrome & Firefox on Android). Not so much
on Safari, we have to find a different solution there.