[keyserver] Generalize state_check status handling using specs
Summary:
Instead of computing hash for each store by hand, iterate over specs and compute all the hashes for them.
https://linear.app/comm/issue/ENG-4631/migrate-checkstate-from-session-utils-to-a-spec
Depends on D8946
Test Plan: Bring back the old hash logic and compare the results with the new version.
Reviewers: kamil, bartek, inka
Reviewed By: bartek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D8948