Separate ParsingPackage into core and ParsedPackage into server

PackageParser exists in the core framework SDK, and so callers
to it would not not expect a call into the system server.

However, some planned features require parts of parsing to exist
in the server so that package state/settings contained in the
server can be applied to the package.

To resolve this, separate ParsingPackage and ParsedPackage
through a hard boundary, where ParsingPackageImpl is roughly
equivalent to the previous PackageImpl, and the new PackageImpl
is everything that should exist in the server and not core.

This also copies over documentation and cleans up the data models
significantly. The fields have been moved to @NonNull, and in
preparation for true immutability, all Collection structures
have moved to generic types and assigned Collections#empty_().

This begins moving away from @hide AppInfo fields, so internal
use of flags/privateFlags is deprecated. It is now replaced by
straight booleans. For simplicity's sake, existing flags have
also been migrated.

This is split for readability and will not compile without
the followup commits.

Bug: 135203078

Test: atest com.android.server.pm.parsing
Test: atest PackageParserTest
Test: atest PackageParserLegacyCoreTest
Test: atest ScanTests
Test: atest ParallelPackageParserTest
Test: manual toggle and run AndroidPackageParsingTestBase

Change-Id: Ib4fe51d729a56bfb0ea1316e577358ba0dfceccf
13 files changed