Treat messages arriving in active buffer as unread if window is not focused
Reset unread count on disconnect
Merge pull request #216 from lorenzhs/pagevisibility

Treat messages arriving in active buffer as unread if window isn't in focus