Finishes activities in the reverse order

This is the follow-up changes after commit b131a1e that the
activities in the Task should be removed in the reverse order
in order to prevent unnecessary activity lifecycle events
sending to the next top activities in the Task.

This should be done regardless shell-transition is enabled.

Bug: 249658397
Test: wm presubmit
Change-Id: Id89996fa9ccde5164645ea5fefe77f7b63d5372a
1 file changed