[keyserver] Make sure to reset session when lastUpdate is 0
Summary:
See the code comment. This situation can happen after registration, where it would be harmless to do a session reset. And it can happen if policies are not acknowledged at the time of a login, in which case we really to reset it after the policies are acknowledged.
Depends on D12388
Test Plan:
Prior to this, my test plan in D12386 would repopulate some data, but not all data. The issue is that we were treating it as an INCREMENTAL rather than FULL, but INCREMENTAL was not possible from time 0 because some of the updates since that point had been deleted.
In additional to that, I did some work to verify the safety of this change:
- I tested registration via the new registration flow, and confirmed that nothing weird happened (this is the other case where serverTime is set to 0)
- I looked through the login/registration code on keyserver and on the client to confirm that there were only two cases where serverTime was set to 0
Reviewers: kamil
Reviewed By: kamil
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D12389