Schedule local activity relaunch

If local activity relaunch is executed immediately, and if
recreate() was called from a lifecycle callback, then existing
instance of activity will be destroyed while ActivityThread may
continue using it to finish performing a transaction item.
To remove this double lifecycle loop we now schedule local activity
relaunch on client thread instead of executing it immediately.
It worked in similar way until changes in b/30060825.

Bug: 78576150
Bug: 64610483
Bug: 30060825
Test: ActivityLifecycleTests
Change-Id: Ic0cef229f2f9df0fa40066d8540c4b29da7bdc58
2 files changed