Add wait for task removal for some tests in ActivityTransitionTests

For 8 out of the 10 tests in ActivityTransitionTests[*], we are doing
the following sequentially:
1. `getTestBounds()` starts LauncherActivity, and uses its bounds as
   testBounds. Then we minimize and remove the task.
2. `runAndAssertActivityTransition()` starts the LauncherActivity again.
3. `runAndAssertActivityTransition()` starts a specific activity
   according to the test, captures a screenshot and verifies the pixels
   based on the testBounds from 1.

But actually sometimes in 2 when the LauncherActivity starts, "remove
task" in 1 hasn't finished yet. So the existing task is still at the
position of testBounds.
For desktop devices like ARC where the task is started in freeform
mode, TaskLaunchParamsModifier#adjustBoundsToAvoidConflictInDisplayArea
repositions the new activity(in 2) to avoid bounds collision with the
existing task.
Therefore, in 3 when verifying the pixels, since the new activity has
been repostioned to a different bounds from the testBounds, the tests
fail.

This commit adds waitForAppTransitionIdleOnDisplay() in 1 after task
removal, so that the bounds collision avoidance logic won't get
triggered and the tests can be more stable in desktop environment.

[*] except testActivityTransitionOverride and testTaskTransitionOverrideDisabled

Bug: 258990770
Bug: 258991031
Test: atest ActivityTransitionTests
Change-Id: I462b14e593e79e7a83cc8fddb66085924284e52e
1 file changed