switchToActivityBuffer: Prioritise notifications

If there is a buffer with a notification, go there. Otherwise, go to one with unread lines.
Fix JS coding style

TODO: rebase this as a fixup. I don't think the github web interface supports that.
Merge pull request #150 from lorenzhs/patch-2

switchToActivityBuffer: Prioritise notifications