[keyserver] Login or register before tables are created
Summary:
issue: ENG-7267
We want to login / register before db starts being set up, so that if the credential are incorrect, and an error is thrown, the db is not left in an inconsistent state
unpickleAndUseCallback is modeled on fetchCallUpdateOlmAccount, but was rid of code that is used for fetching from and saving to the db. I also skipped retries, which only make sense if we operate on the db - they imitate transactions. Instead of fetching and saving account in the db, I remember them in the memory, and return them from verifyUserLoggedInWithoutDB to be saved once the tables get created
Test Plan:
Ran my nix script that created a new ks, checked that the admin got correctly registered with identity.
Ran my nix script and provided incorrect credentials - checked that there are no tables in the db
Checked that the accounts saved to the db are the accounts after transformations (logged the accounts at the end of verifyUserLoggedInWithoutDB and checked that the same ones are in the db)
Reviewers: will, marcin, kamil
Reviewed By: marcin
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D11542