[web] Introduce useFilteredChildThreads hook
Summary:
Introduce hook containing logic responsible for selecting ChatThreadItems containing child threads with some filter, so it could be used in both Subchannels and Sidebars modals on web.
The hook also adds watching to threads and fetches most recent message from server if necessary, so all threads data are always updated.
The logic is almost completely moved from SubchannelsModal and only some default parameters were added.
Test Plan: The subchannels modal should behave in the same way as before change.
Reviewers: tomek, atul
Reviewed By: tomek
Subscribers: ashoat, adrian, abosh
Differential Revision: https://phab.comm.dev/D4606