[lib] Hash new threads on keyserver login
Summary:
issue: ENG-5820
When we log in to a keyserver, we want to hash the new threads. So we set threadHashingStatus to starting. Then in the handler, which takes threads and creates batches to be hashed, we filter out the threads that are already present in the integrity store, and only hash the new ones. Since threadHashingStatus was only ever set to starting on login (or in default state, but then the hashes are an empty object), this doesn't break anything.
There is no need to hash threads on identity login, since identity provides no data on threads
Test Plan:
Tested that when a user logs into the app all threads are hashed.
Tested that when keyserverAuthActionTypes.success is dispatched and has a new thread in payload, this thread and only this thread is hashed.
Reviewers: michal, kamil, ginsu
Reviewed By: michal
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10551