[web] Extract useBadgeHandler
Summary:
Part of ENG-3350.
This diff extracts the code responsible for updating the tab title/ icon badge for the web/ desktop app. The logic will be changed in the later diff.
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/D7327