Clean up the logic of selecting launching stack

- Consolidate the logic of get or create the launching stack.
- A launch stack was created and abandon (sometimes leaked)
  due to the created stack was not applicable. Now we return
  a valid launch stack where the activity can actually be landed.
- Defer resuming activity while brought the target stack to front.
- Remove some outdated code.

Bug: 139449647
Test: atest WmTests CtsWindowManagerDeviceTestCases
Change-Id: I2c07f8d5dfbc025b7a18f6c0307c361865a601f4
4 files changed