Fix destruction of preserved surfaces for non app windows.

A new codepath (if (mChildrenDetached)) is allowing the IME surface
to become preserved. However WindowState#onAnimationDone will not
properly clean up preserved surfaces in the case of windows without
an App Token. For windows with an app token we follow the destroySurfaces
path which does the right thing via WindowState#destroySurface however
for the AppTokenless path we simply add to mDestroySurfaces. To fix this
we ensure when processing mDestroySurfaces we also process preserved surfaces.

Test: Manual. go/wm-smoke.
Bug: 78089772
Change-Id: Ia54e31c83a941ce6ae8ceb11672634c01a91e2e9
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index fd965fb..50d0d0a 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -692,6 +692,7 @@
                     wallpaperDestroyed = true;
                 }
                 win.destroySurfaceUnchecked();
+                win.mWinAnimator.destroyPreservedSurfaceLocked();
             } while (i > 0);
             mService.mDestroySurface.clear();
         }