In the prior diff, we introduce some logic for resetting login state when authoritative keyserver auth fails during login or registration.
However, we don't wait for the login state to be reset before letting the user retry. That can lead to TASK_CANCELLED errors when we attempt ops on SQLite while it is in the process of being cleared (initially described on Linear).
To avoid this, we won't let the user retry until the database deletion is complete. During this period the UI will continue to show the login or registration as being in progress.
Note – would normally put @tomek and @inka on this review, but since they're out for the rest of this week, I'm asking @varun to review.
Depends on D11845