lib] Refactor message reducer
Summary:
issue: ENG-5766
MessageStore looks like this:
export type MessageStore = { +messages: { +[id: string]: RawMessageInfo }, +threads: MessageStoreThreads, +local: { +[id: string]: LocalMessageInfo }, +currentAsOf: { +[keyserverID: string]: number }, };
messages, local and threads are filtered by updateMessageStoreWithLatestThreadInfos/processMessageStoreOperations based on what threads were removed by thread reducer. I only need to update currentAsOf.
Test Plan: Tested that if a user logs out of one keyserver all data related to this keyserver is wiped from MessageStore
Reviewers: michal, kamil, ginsu
Reviewed By: michal
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10653