profman: Return whether the profile matched instead of updated.

This change fixes the bug that ART Services doesn't accept a profile in
a DM file. Before this change, if the reference profile doesn't exist
but a DM file exists, when compiling the app, ART services will
unexpected fall back to "verify".

When ART Services uses a profile in a DM file, it runs profman with
`--copy-and-update-profile-key` on that file and checks the return code.
The intention is to check whether the profile is usable for the APK.
Therefore, the return code should indicate whether the profile matches
the APK, rather than whether the profile has been updated or not. An
update only happens if the dex checksum matches while the dex location
doesn't match. If both the dex checksum and the dex location match,
there will be no update, but profman should still return a code
indicating that this is a happy case.

Bug: 248609414
Test: atest ArtGtestsTargetChroot:ProfileCompilationInfoTest
Test: manual -
  1. Install YouTube with a DM file.
  2. Delete odex file and reference profile.
  3. adb shell pm art optimize-package -m speed-profile \
       com.google.android.youtube
  4. See the compilation successful with the profile in the DM file.
Ignore-AOSP-First: Contains internal-only change. Will cherry-pick the
  AOSP part later.
Change-Id: I18e41bc962083e78e441fd18ab659037ad61badd
8 files changed