Allow to transfer+seal a install session

... so that one package can supply the data and another one can issue
the commit.

Also allow reading of sealed sessions.

Also lock more in PackageInstallerSession so that we can be sure the
session is not used by the old package anymore once transferred and that
all calls into the session work on consistent data.

Bug: 37281396
Test: cts-tradefed run cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
      Installed and uninstalled packages via the PackageInstaller app
      Installed and uninstalled packages via the Google Play Store

Change-Id: Id4b7a0071d703b7d18c9f5bf2bd15ebf67086d07
7 files changed