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/runtime/dex/dex_file_test.cc b/runtime/dex/dex_file_test.cc
index 87eec57..3ee115c 100644
--- a/runtime/dex/dex_file_test.cc
+++ b/runtime/dex/dex_file_test.cc
@@ -731,7 +731,7 @@
       kRawDexDebugInfoLocalNullType, tmp.GetFilename().c_str(), 0xf25f2b38U, true);
   const DexFile::ClassDef& class_def = raw->GetClassDef(0);
   const DexFile::CodeItem* code_item = raw->GetCodeItem(raw->FindCodeItemOffset(class_def, 1));
-  CodeItemDebugInfoAccessor accessor(raw.get(), code_item);
+  CodeItemDebugInfoAccessor accessor(*raw, code_item);
   ASSERT_TRUE(accessor.DecodeDebugLocalInfo(true, 1, Callback, nullptr));
 }