Add CTS test where Dependency Installer abandons sessions

In one test, we abandon the session before invoking callback, and in
another we abandon the session after we have invoked the callback.

Also, more refactoring to reuse code between different behaviors.

Bug: 372862145
Test: atest PackageManagerShellCommandInstallTest
FLAG: android.content.pm.sdk_dependency_installer
Change-Id: I56ad179d90853a9f554d79fae94cc9fec55c0999
2 files changed