[lib] Create thread store ops from updates in a spec
Summary:
Move the logic from a reducer to specs.
Depends on D9244
Test Plan: Open two clients and check if making operations (e.g. updating or joining a thread) generates the right ops on the other.
Reviewers: kamil, bartek, inka
Reviewed By: kamil
Subscribers: ashoat, michal
Differential Revision: https://phab.comm.dev/D9245