Move closing task removal to onTaskVanished

Previous closing task removal was making all the tasks minimized instead of removing
from the repo. Move the removal to onTaskVanished as well.

Fix: 372438407
Test: atest FreeformTaskListener
Test: Close 2 apps back to back with X button, ends up on launcher
instead of having an empty desktop
Flag: EXEMPT Bugfix

Change-Id: I911b23603248e5fc906ce22f31c41ee9ccedeb3b
2 files changed