Support non-privileged APKs in APEX.

This change adds initial support for scanning APEX directories looking
for APK, and make them available to the system as normal system APKs.
For now privileged apps and resource overlay are not supported, and the
support will be added in a later CL.

Scanning features are inherited from the partition in which the
preinstalled version of a given APEX module is located.

Supports both flattened and un-flattened APEX configurations.

Bug: 138429615
Test: Compiled a test apex with the Snake app installed in it. Verified
app is correctly scanned and usable. Tried also installing the apex in
/vendor and /product.
Exempt-From-Owner-Approval: Approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9533445
Merged-In: I8fb91317da0296567403b2b62babbb71e4b48938
Change-Id: I8fb91317da0296567403b2b62babbb71e4b48938
4 files changed