Use DexManager logic to decide if a package is used by other apps

Stop relying on the file marker recorded by the runtime. We have the
same data available from the DexManager.

The clean up CL to remove the handling of the file markers will follow.

Test: verify that "shared packages" (e.g. gmscore) are not compiled with speed-profile.

Bug: 32871170

(cherry picked from commit 07b6eabe79261267ecd7114790e96e1f6828672a)

Change-Id: I2969b75fa77d38dde0073ef67aa89b1dc91237b5

Merged-In: I6cc5834ac88489e69896cd5fba9ed9968aa7f5a2
5 files changed