mPackages is not a lock!

This change breaks the dual purpose of mPackages into two fields:
mPackages as a proper map of packages and mLock as the lock of state
throughout PackageMangerService.

Bug: 137881067
Fixes: 137961986
Test: atest AppSecurityTest
Change-Id: I767dfccd3984db9d8cf45fc482a2fd214f1124e4
5 files changed