Clean-up change transition when cancelled before anim starts

Change transitions require the app window be put in an interim
state while waiting for the end-state snapshot and animation
to start. when moving an app from one display to another, it
gets a config/mode change before onDisplayChanged causing it
to prepare for an animation that never happens.

This change cleans-up the pending-change-transition state in
the various cases where the animation is cancelled before it
has started.

Bug: 120034483
Test: create simulated display in desktop mode, launch freeform app
      on it, remove display. App is now visible.
      Added more AppChangeTransitionTests for these cases.

Change-Id: I14a758957903ff7b3efd286f713f81b9de293fcb
diff --git a/services/core/java/com/android/server/wm/AppWindowThumbnail.java b/services/core/java/com/android/server/wm/AppWindowThumbnail.java
index 0e14e46..5519729 100644
--- a/services/core/java/com/android/server/wm/AppWindowThumbnail.java
+++ b/services/core/java/com/android/server/wm/AppWindowThumbnail.java
@@ -143,7 +143,7 @@
 
     void destroy() {
         mSurfaceAnimator.cancelAnimation();
-        mSurfaceControl.remove();
+        getPendingTransaction().remove(mSurfaceControl);
     }
 
     /**