Handle some Recents finish corner cases

This handles a couple of the corner-cases around recents transition
and "internal" live-tile activity transitions.

The first is that the change detection will check if a going-invisble
activity is already invisible. This way, if the finish transaction,
makes launcher invisible, the activity transition will ignore it
instead of trying to animate an already-invisible activity. This
works because we defer commitVisibility so that we can animate with
visible content.

The second is that the finish operation for transient-launch will
not commitVisibility for any activities under a transient-hide task
if that task didn't actually hide. This way it won't prematurely
destroy activity content that is still visible/animating.

Bug: 276755325
Test: Tap on activity-launch icons through gesture bar and observe
      fewer flickers (this doesn't solve all of them though). Can
      look at logs to verify that the flickers are not from these
      sources.
Change-Id: I6d167e50ec0211e811872ae9a6aabc8164ebd65d
3 files changed