[keyserver] Use specs to compute invalid top-level keys
Summary:
Iterate over specs and check if their key is mentioned as invalid.
https://linear.app/comm/issue/ENG-4631/migrate-checkstate-from-session-utils-to-a-spec
Depends on D8948
Test Plan: Modify keyserver db and check if the store get fixed.
Reviewers: kamil, bartek, inka
Reviewed By: bartek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D8949