apexd: temp mount packages during staging.

* Refactored lambda inside verifyPackages into verifyPackage function.
* Made verifyPackage temp mount a package.
* Added tests to verify that apexd doesn't leak temp verity devices from
  verifyPackage.

This will enable:
* Shim apex content validation.
* Making sure that re-installing a system package is functionally
  equivalent to deleting currently active version of that package.
* Do more verification of apex_payload.img if we want to.

Test: apexservice_test
Bug: 128625955
Change-Id: I37bd2e2f3cc0e846040d0f5f049005f46cbc3186
2 files changed
tree: 9f07fcc35ea8a4d7cde950b5a577b8701c4f5be2
  1. apexd/
  2. apexer/
  3. proto/
  4. shim/
  5. tests/
  6. OWNERS
  7. PREUPLOAD.cfg