[lib] Extract read status operations logic
Summary:
Compute the state in a single place.
https://linear.app/comm/issue/ENG-8930/unify-the-approach-to-replies-count-and-unread-status-updates
Depends on D12975
Test Plan: Processed an operation representing creation of a new thread with a viewer and a new user, created by that user. Checked if the thread was created and was set to unread.
Reviewers: kamil, inka
Reviewed By: inka
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12987