[keyserver] Introduce keyserver state sync spec
Summary:
Fetch functions require viewer as an argument, but Viewer is defined in keyserver - that's why we need to define this spec outside of lib.
Currently, we're accessing serverStateSyncSpecs props directly, but later in the stack this is going to be replaced by iterating over the specs.
https://linear.app/comm/issue/ENG-4631/migrate-checkstate-from-session-utils-to-a-spec
Depends on D8926
Test Plan: Modify threads, entries and users in the db and check if state check fixes client state. Also check if after fixing there are no invalidKeys.
Reviewers: kamil, bartek, inka
Reviewed By: kamil, bartek
Subscribers: atul, ashoat
Differential Revision: https://phab.comm.dev/D8927