Prepare PackageManagerService for snapshots

Bug: 161323622

Make some of the attributes in Settings private so they cannot be
changed without the knowledge of the Settings class.  The
PackageManagerService methods that modified these attributes are moved
into Settings.

Create PackageManagerService.invalidatePackageInfoCaches().  PM
classes now call this method instead of the PackageManager method.
The new method will be the home for all actions necessary when the
PackageManagerService state changes.

This change is not meant to affect any functionality or performance.

This change does correct some repo-hook warnings, all of which were
pre-existing.

Test: atest
 * FrameworksServicesTests:UserSystemPackageInstallerTest
 * FrameworksServicesTests:PackageManagerSettingsTests
 * FrameworksServicesTests:PackageManagerServiceTest
 * FrameworksServicesTests:AppsFilterTest
 * FrameworksServicesTests:PackageInstallerSessionTest
 * FrameworksServicesTests:ScanTests

Change-Id: I49d2a8921c5979ba8a225e695a36c552cc40512a
2 files changed