[lib] Add function allowing extracting ThreadInfo from updates
Summary:
We need this later in the stack to extract updated thread info from the result of operations processing.
https://linear.app/comm/issue/ENG-8930/unify-the-approach-to-replies-count-and-unread-status-updates
Depends on D13055
Test Plan: Flow, tested with the rest of the stack.
Reviewers: kamil, inka
Reviewed By: inka
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D13057