Installd: don't generate app image without reference profile

Use app images only if we are compiling profile-guided
and reference profile exists.

Fixed test logic to use a dm_file so that the profile is actually
opened by dexopt.cpp.

Test: adb install xxx.apk & check if app image file exists
Bug: 112860306
Change-Id: I50375a9d9213ee1e7b1fffbdd69c8510f509e008
Signed-off-by: liulvping <liulvping@xiaomi.com>
3 files changed