Simplify finishing flow for activities waiting for next one to resume

The finishing code used to have custom logic that handled the case
when an activity is paused in focused stack and needs to be added to
the list of finishing activities instead of being destroyed
immediately. This is needed to make sure that the next activity is
resumed first before we stop and destroy the finishing one. It will
eventually be destroyed when the next activity reports idle.

This CLs instead unconditionally marks the activity as finishing and
invokes RootActivityContainer#resumeFocusedStacksTopActivities(). If
any activity is made resumed as a result of this call - then all we
need to do is to wait for it to report idle. If no activity was made
resumed - it means that we can go ahead and request destruction
immediately.

Bug: 137329632
Bug: 142125019
Test: WM CTS
Change-Id: I28c08f06ce74502053d141a21ae81e1b99df7228
2 files changed