Decompose prepareAnimationIfNeeded into smaller methods.

Use AnimationHandler to create animation leashes, which can
support Activity and Task, also help handle release animation leashes.
Also fix the opening animation leash get higher z-order than closing
animation leash.

Reimplement back-to-home, cross-activity, cross-task animation by the
AnimationHandler, and by decompose prepareAnimationIfNeeded into a
builder class, it should be easier to maintain.

Preparing to adapt for windowless starting surface, which will draw
either splash or snapshot surface on the animation leash.

Bug: 131727607
Bug: 238474994
Test: atest BackNavigationControllerTests
Test: do back gesture on both shell/legacy transiton system, verify
no flicker happen either trigger back. Also verify no surface left
after transition finish.

Change-Id: I27f1df85fab792bbbcdcc430e087a3a38a74f1cc
4 files changed