Apexd: Move preinstall code

In the new flow, Preinstall should be performed as of staged-session
submission, not staging.

Refactor the code and expose an additional binder function so that
apexservice_test can still "unit-test" preinstall.

Bug: 119261380
Bug: 120799580
Test: atest apexservice_test
Change-Id: I8714bab8912ea9358c973f5f7408c8894bb2a962
7 files changed
tree: 7381feb02ae999c6d0c9b1a4d2e1b6c78b6bc4b4
  1. apexd/
  2. apexer/
  3. proto/
  4. tests/
  5. OWNERS
  6. PREUPLOAD.cfg