Fix cdex bugs to enable ART_DEFAULT_COMPACT_DEX_LEVEL=fast tests passing

Compute dex checksum for compact dex generation. Handle input vdex
by not aborting in oat_writer, instead just avoid generating compact
dex for the input vdex case.

Re-enabled some compact dex tests.

Bug: 63756964
Test: ART_DEFAULT_COMPACT_DEX_LEVEL=fast test-art-host
Change-Id: Ic9b4e4e59e6cd22b66ee2fc0d32c9b4a15f13497
diff --git a/dexlayout/dexlayout.cc b/dexlayout/dexlayout.cc
index 33155b6..f87778a 100644
--- a/dexlayout/dexlayout.cc
+++ b/dexlayout/dexlayout.cc
@@ -53,10 +53,6 @@
 
 using android::base::StringPrintf;
 
-// Setting this to false disables class def layout entirely, which is stronger than strictly
-// necessary to ensure the partial order w.r.t. class derivation. TODO: Re-enable (b/68317550).
-static constexpr bool kChangeClassDefOrder = false;
-
 /*
  * Flags for use with createAccessFlagStr().
  */
@@ -1594,7 +1590,7 @@
   }
   CHECK_EQ(class_data_index, class_datas.size());
 
-  if (kChangeClassDefOrder) {
+  if (DexLayout::kChangeClassDefOrder) {
     // This currently produces dex files that violate the spec since the super class class_def is
     // supposed to occur before any subclasses.
     dex_ir::CollectionVector<dex_ir::ClassDef>::Vector& class_defs =