Fix some bugs around stack parenting

1. Don't unfreeze/clear snapshot in onChildVisibilityRequested
   if its becoming visible... this situation means that the
   container changed via going invis + made vis again (which
   is a result of a single transaction reparenting + changing
   mode).

2. Fixed a crash in applyTransaction where if you tried to
   reparent a task that was already on the display to null,
   it would call reparent rather than re-order. DisplayArea
   reparent crashes if the task is already a child.

Bug: 151881448
Test: Added some tests
Change-Id: Ieb5794b365bc256ec02a95a4abbf16d9a28753bd
3 files changed