[lib] Introduce useThreadsInChatList and consume in useFilteredChildThreads
Summary:
We want to replace usages of threadInChatList with the useThreadInChatList hook. However, similar to what we ran into with D11924, there are situations where we need to do the check on a list of ThreadInfos instead of a single one. We can't use the useThreadInChatList hook within a for-loop or .filter() block, so we need to introduce a new hook which handles the iteration "inside." Thankfully, we can consume useThreadsWithPermission within useThreadsInChatList so we can reuse that existing logic.
Depends on D11925
Test Plan:
flow and close reading
Add log statements to useFilteredChildThreads and ensure return value of threadInChatList and useThreadsInChatList are identical.
Reviewers: ashoat, ginsu, tomek, varun, will
Reviewed By: tomek
Differential Revision: https://phab.comm.dev/D11950