[keyserver] Determine which entities to fetch in a spec
Summary:
Add a function to a spec which determines which threads, entries, etc. need to be fetched.
Depends on D9653
Test Plan: Generate some updates, reintroduce old code, and compare new with old result using _.isEqual
Reviewers: kamil, inka, bartek
Reviewed By: kamil
Subscribers: ashoat, wyilio
Differential Revision: https://phab.comm.dev/D9654