* put rereg mode params into a struct for sharability
* add step and UI handling for when we become deregistered during post-reg steps
* handle dereg when syncing push tokens
* show generic error on kbs backup failure
* handle dereg when restoring from kbs
* handle dereg during profile setup steps
* finalize pni stuff before deregistering
* add comment
* change debug fail to log
* Navigate to verification vc before showing popup so that we don't cancel the nav controller pop
* send a session sms code even if we get interrupted right after session creation
* improve state handling for initial session sms code
* nit: make var fileprivate
* show error when state changed on screen
This change should have no user impact. I think it's useful on its own
but it also makes a future task easier.
You can't ever have a negative number of remaining PIN attempts, so I
made sure we're using unsigned ints everywhere.
We also had two identifiers for "remaining attempts" (`triesRemaining`
and `remainingAttempts`) so I standardized it.