Add otapreopt logic for CompactDex version bump

For old versions, or in the flag.

Bug: 63756964
Bug: 74245837
Test: adb shell /data/nativetest64/installd_otapreopt_test/installd_otapreopt_test

(cherry picked from commit dbc4ce6f9a60b5e4d7e7bcbb4c3fac8a71b7984c)

Merged-In: Ie316f5327ca479f55b34a3ddb7cd6640043116cd
Change-Id: If8442870c85330005ceea52bad07a07c9105091a
2 files changed