Don't assume that the profile exists.

Before this change, the profile of a primary dex is created by
Package Manager on app installation, the profile of a secondary dex is
created by DexLoadReporter on dex load, and the runtime assumes that the
profile always exists. After this change, the runtime can create the
profile if it doesn't exist. This has the following benefits:
- When ART Services wants to clear a profile, it can simply delete it,
  as opposed to the installd's approach: acquiring a flock and trucating
  the file. This reduces the risk of artd encountering a dead lock.
- We can eventually make PM and DexLoadReporter simpler by removing the
  code that creates profiles.

Bug: 248318911
Test: art/test.py -b -r --host -t 595
Ignore-AOSP-First: An internal-only change depends on it. Will
  cherry-pick later.
Change-Id: I929e3856f02f498ed203d1af0e7859337a82669a
2 files changed