This should cause no change in behavior.
We had logic like this pseudocode:
```
unreadCount = db.countUnreadMessages()
messagesWithUnreadReactionsCount = db.countMessagesWithUnreadReactions()
if unreadCount == 0 && messagesWithUnreadReactionsCount == 0 {
// Avoid unnecessary writes.
return
}
db.markMessagesRead()
```
This optimization works but has two problems:
1. We don't actually need the count. We just need to know whether
anything exists.
2. If there are unread messages, we should do the cleanup regardless,
and we don't need to do the second check query.
Now the pseudocode looks like this:
```
if db.hasUnreadMessages() || db.hasMessagesToMarkRead() {
// Avoid unnecessary writes.
return
}
db.markMessagesRead()
```
* Use schedulers with ChainedPromise
* Add full queue initializer redirection in Schedulers
* pass scheduler to OWSURLSession
* Use schedulers in SystemStoryManager
* make SystemStoryManagerTest synchronous
* Move resend code buttons above keyboard
* add showHelpText to verification code screen state
* hook up help button, does nothing yet
* show help bottom sheet
* lint
* pr feedback
* show back to back errors on verification code screen
* handle verification code attempts exhausted
* let the user resend a code after submission attempts are exhausted
* clear last digit after an incorrectly entered verification code
* wipe errors and allow proceeding when changing e164
* lint
* Don't wipe local kbs state when kbs stuff fails for change number; its still valid for the old number
* remove remaining error sheet todos
* fix tests
* add error message for rate limiting as it appears in mocks
* update colors in verification code view when theme changes
* Set validation state when we can't submit a verification code yet
* show alert when trying to submit verification code too many times
* handle changing e164 once we have a session
* Handle rate limit for recovery password based registration
* handle rate limit for session based createAccount/changeNumber request
* lint