[keyserver] Handle new session state sync
Summary:
Iterate over specs and fetch appropriate data.
https://linear.app/comm/issue/ENG-4632/migrate-state-sync-to-a-spec
Depends on D9049
Test Plan: Bring back the old code and compare if the same payload was generated after closing the app, deleting a session and opening the app.
Reviewers: kamil, bartek, inka
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D9081