Proactively dequicken on debuggable switch.

Previously we would generally not really consider dex2dex quickening
with debuggable processes. This could cause problems for structural
redefinition since the -quick opcodes are incompatible with the types
of changes structural redefinition allows. Furthermore this can cause
some unexpected behavior where (for example) check-casts might appear
to pass even if debugger activity should cause it to fail.

In order to fix these issues we make the runtime more proactively
dequicken dex-files when we start or switch to JAVA_DEBUGGABLE mode.

Test: ./test.py --target --host
Test: adb install -t ~/misc/Bandhook-Kotlin/app/build/outputs/apk/debug/app-debug.apk && adb shell monkey -p com.antonioleiva.bandhookkotlin -c android.intent.category.LAUNCHER 1
Bug: 134162467
Bug: 144168550
Change-Id: I2673c91b72ae7048d2ff71a1cf68cf552d4e8004
7 files changed