Replace mPendingRemove with hierarchy deferred removal

To eliminate the global list and simplify the path of surface placement.

This reverts commit 4ddb1d869c70a2e0c837c9ac8b0fac280299cb6f.

Reason for revert: Fix the original CL (commit bb2efa0) by
checking "!isSelfAnimating(0 /* flags */, EXIT_ANIMATING_TYPES)"
in WindowState#handleCompleteDeferredRemoval.

Bug: 163976519
Test: WindowContainerTests#testHandleCompleteDeferredRemoval
Test: Long press power key and dismiss the power menu window.
      The window should have fade out animation.

Change-Id: I9bd75a82952ef129f528a0dba8fe740eddf60c49
4 files changed