Destroy window decorations of closing non-visible tasks

Uses onTaskVanished to detect non-visible closing tasks that won't be
included in shell transitions, which is the usual path for decorations
to be destroyed.

Bug: 296921167
Bug: 338430613
Bug: 323251951
Test: close invisible tasks (e.g. from overview). Dump WMShell to verify
decoration is no longer held by the view model. Reference the memory
regeression bug linked above. See that the regression is fixed.

Change-Id: Id4538ac41b77a4c81454d6837db4ffaff8c2b0e5
6 files changed