[keyserver] Group entry and message infos by threadID instead of iterating over them for each JOIN_THREAD update
Summary:
For each JOIN_THREAD update we were iterating over all the entry / message infos. Grouping them by threadID will improve the performance when we deliver more than one action of this type.
Depends on D8768
Test Plan: Reintroduce removed code and add console logs where we compare previous with new results. Then join a thread and check if the result is the same.
Reviewers: kamil, bartek, inka, ashoat
Reviewed By: ashoat
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D8776