Enable code item deduping

Dedupe code items if they have the same contents, this is safe
because of the fixed quickening logic.

Removed duplicate code items in ManyMethods that caused the startup
methods section to be empty in dex2oat_test.

To avoid errors related to quickening and compilation of shared code
items, quickening is currently disabled for shared code items.

Bug: 63756964
Test: test-art-host

Change-Id: I7c62eb746785d787c5269effd396f7be4859d3a6
diff --git a/compiler/utils/atomic_dex_ref_map.h b/compiler/utils/atomic_dex_ref_map.h
index 9ff506d..3474e16 100644
--- a/compiler/utils/atomic_dex_ref_map.h
+++ b/compiler/utils/atomic_dex_ref_map.h
@@ -45,6 +45,9 @@
   // Retreive an item, returns false if the dex file is not added.
   bool Get(const DexFileReferenceType& ref, Value* out) const;
 
+  // Remove an item and return the existing value. Returns false if the dex file is not added.
+  bool Remove(const DexFileReferenceType& ref, Value* out);
+
   // Dex files must be added before method references belonging to them can be used as keys. Not
   // thread safe.
   void AddDexFile(const DexFile* dex_file);