[installd] Create profile snaphots for boot image

Create the profile snapshot for the boot image by aggregating all primary
profiles. During aggregation data that does not belong to the boot image
is filtered out. The matching is done based on the dex files provided in
the classpath argument.

(cherry picked from commit e61189e0ad2104360a188d36210bd1ee43803a64)

Test: installd_dexopt_test
Bug: 30934496
Merged-In: Ib980ab3feb9f9838dff81a3861693cd08b1df9ab
Change-Id: Ib980ab3feb9f9838dff81a3861693cd08b1df9ab
8 files changed