Reduce lock contention of setting running shell remote transition

When the transition is ready on shell side, the core may be still
running surface placement. Then it may easily meet lock contention
when setting the animating state for the animation player process.

This change moves the animation delegate to TransitionController.
It can recognize the delegate process if the remote animation is
specified from ActivityOptions. So when shell is calling
setRunningRemoteTransitionDelegate, it can just check if the process
is handled without entering WM lock.

The case of using TransitionFilter may still encounter contention
the remote registrations only exist on shell side.

Also add a quick check at shell side to skip the IPC if the app
thread of remote animation is null. Such as when launching from
quick settings that the remote is actual the local process.

Bug: 235323163
Test: atest TransitionTests#testRunningRemoteTransition

Change-Id: I137fcdff3cb5658aad5f7452c33bbc8d70f42398
11 files changed