Use pageVisibiltiy API to disconnect eventsource

And reduce number of open connections from client
Merge pull request #1650 from jsbin/feature/es-disconnect-on-hide

Use pageVisibiltiy API to disconnect eventsource