[lib] Refactor reduceMessageStore
Summary:
issue: ENG-5821
On identity login we want to remove old messages from the store. Identity doesn't return any messages, so messageInfos, truncationStatus and currentAsOf are empty
threadInfos come from thread reducer, which will be udated to remove all threads on identity login
Test Plan:
Tested that if a user is logged in to the app, and connected to Ashoat's keyserver, and then logs in to another keserver using keyserverAuthActionTypes, the new messages provided by this keyserver are saved in the message store (if the corresponding thread was saved in the thread store)
Tested that if tempIdentityLoginActionTypes.success is dispatched, the messages in the message store get wiped.
Reviewers: michal, kamil, ginsu
Reviewed By: michal
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10589