[lib] refactor Thread Store Operations to use generic type
Summary:
Make logic part of the general ops interface
Depends on D8618
Test Plan: Flow
Reviewers: michal, tomek, atul
Reviewed By: atul
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D8619