Clean up CodeItemAccessors and Compact/StandardDexFile

Change constructor to use a reference to a dex file.

Remove duplicated logic for GetCodeItemSize.

Bug: 63756964
Test: test-art-host
Change-Id: I69af8b93abdf6bdfa4454e16db8f4e75883bca46
diff --git a/profman/profman.cc b/profman/profman.cc
index 71f7f9d..c4216fa 100644
--- a/profman/profman.cc
+++ b/profman/profman.cc
@@ -727,7 +727,7 @@
     const DexFile::CodeItem* code_item = dex_file->GetCodeItem(offset);
 
     bool found_invoke = false;
-    for (const DexInstructionPcPair& inst : CodeItemInstructionAccessor(dex_file, code_item)) {
+    for (const DexInstructionPcPair& inst : CodeItemInstructionAccessor(*dex_file, code_item)) {
       if (inst->Opcode() == Instruction::INVOKE_VIRTUAL) {
         if (found_invoke) {
           LOG(ERROR) << "Multiple invoke INVOKE_VIRTUAL found: "