Cleanup handleActivityCreated

1. For new created activity, check if it should be split with the other
   activity that is currently split with the activity below.
2. When the activity is reparented back to the Task from PiP window,
   check if it can be split with the existing.
3. Breakdown the long #handleActivityCreated to smaller pieces.

Bug: 225371112
Test: atest WMJetpackUnitTests:SplitControllerTest
Test: atest WMJetpackUnitTests:TaskFragmentContainerTest
Change-Id: Iba9f1487328768f5f2c27241d04c57ee7e5ed1d4
5 files changed