Add new dexopt flag to control CompactDex generation

Add a new flag to control CompactDex generation, this allows more
flexibility regarding when compact dex is generated.

The goal is to generate it for cmd package compile.

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

(cherry picked from commit f69c2f7f64e873049f66cfbed1aaad539bf0e063)

Merged-In: I0674f50bbb7413b67e6fbab3199f5c7e78ec875c
Change-Id: I8ed2e41ab94960ca8ac75008a74d5abd14e9ec97
3 files changed