[lib] Add function for splitting calendar query per keyserver
Summary:
issue: https://linear.app/comm/issue/ENG-5283/refactor-login-action
Calendar query inclued filters, that may include an array of threads. We don't want to send the ids of threads of one keyserver to a different keyserver, so we need a way to split them. We want the queries to stay otherwise the same for all keyservers
Test Plan: Run the provided test
Reviewers: michal, kamil, ginsu
Reviewed By: michal
Subscribers: ashoat, tomek, wyilio
Differential Revision: https://phab.comm.dev/D9644