This diff attempts to address ENG-11465. It adds two places where we call onLifecycleChange(getCurrentLifecycleState()) to imperatively refresh the lifecycleState:
- When the LifecycleHandler first renders. This handles a case where the app is backgrounded before PersistGate first renders LifecycleHandler.
- When backup restore concludes. This handles the main case observed in the linked task, where "thrashing" during backup restore results in an incorrect lifecycleState after the restore completes.