Binder cache for getPackagesForUid().

Bug: 140788621

This changes adds a binder cache for the getPackagesForUid() binder call.

Test: A special build that puts the PropertyInvalidatedCache in
verification mode was loaded on the device.  Then one iteration of
MPTS was executed.  No cache inconsistencies were found and no SELinux
violations (associated with the binder cache) were found.  The number
of cache misses was approximately 15% of the total binder calls.
84.5% of all binder calls went through the cache.  The bulk of the
calls that bypassed the cache were singletons: one call per process.
These calls would not be helped by a cache anyway.

Besides the MPTS run, tested by switching between users.

Change-Id: I9a5fb3b7bced031d568aa50b4f3cc495433fcbe7
2 files changed