[lib] Add hash functions to state sync spec
Summary:
Part of ENG-4959
Depends on D9267
Introduces new function to the sync spec: selector. It returns the spec with functions responsible for returning hashes for whole store, individual infos, and to return the list of all ids, using the current redux state. They will be used in the future diff instead of using the convertClientToServerInfos and hash.
Test Plan: yarn flow-all. Correctness of hashing is tested in the next diff.
Reviewers: tomek, inka, kamil
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D9327