[web] Only update badge when connected
Summary:
Part of ENG-3350.
Changed the tab title/ icon badge logic on web to update only when websocket is connected (otherwise the unreadCound could be outdated). Additionaly we update the badge immediately when connecting to the websocket. The logic is identical to the one on native (native/push/push-handler.react.js:226-232);
Depends on D7327
Test Plan: Open the web app in the browser and in the desktop app (without notifs). Check if sending a message updated the tab title (browser)/ badge (desktop), and reading it removes them.
Reviewers: kamil, inka, ashoat
Reviewed By: ashoat
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D7328