[keyserver] refactor functions to check rotate/forget prekeys
Summary:
Issue: ENG-3944.
This is part of D8476 (breaking this for smaller diffs because it's complex).
Addresses:
Fixes:
Test Plan:
- Flow
- check if time last publish time is properly retrieved
Reviewers: varun, marcin, ashoat
Reviewed By: marcin, ashoat
Subscribers: tomek, wyilio
Differential Revision: https://phab.comm.dev/D9419