Fix the orphan child session after abandoning the parent session

In the multipackage staged session set condition, whenever a committed
parent session called abandon(), only calling dispatchSessionFinished()
on the parent session would leave its children session as the orphan
child sessions. The child sessions aren't handled very well and they
would be never handled if the installer applications forget to handle
them.

The solution is to notify the each child session in this multipackage
session after the parent session is abandoned. And, to add the
com.android.tests.atomicinstall.SessionAbandonBehaviorTest to verify the
behavior.

Test: atest StagedInstallInternalTest
Test: atest -p \
    frameworks/base/services/core/java/com/android/server/pm/TEST_MAPPING
Test: atest CtsAtomicInstallTestCases
Test: # monitor the log after atest stagedInstallInternalTest and reboot.
Bug: 164964410
Change-Id: I23dabf7da099baebed63e9f9fc73383984015070
2 files changed