StringPiece clean up.

Profile guided clean up.
Try to avoid creating StringPieces with the contents of a dex file where
the length is known.
Try to avoid RegTypeCache::FromDescriptor when there's a class available.
Make ConstantType::ConstantValue inlinable.
Saving of about 50ms from a 2 threaded ThinkFree compile on host.

Change-Id: I47a12c3c76f46e2c9805be1c3a3e3870fe1f5d85
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 7be5cb8..4534b41 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -40,6 +40,7 @@
   class DexCache;
 }  // namespace mirror
 class ClassLinker;
+class StringPiece;
 class ZipArchive;
 
 // TODO: move all of the macro functionality into the DexCache class.
@@ -432,6 +433,8 @@
     return GetStringDataAndLength(string_id, unicode_length);
   }
 
+  StringPiece StringDataAsStringPieceByIdx(uint32_t idx) const;
+
   const char* StringDataByIdx(uint32_t idx) const {
     uint32_t unicode_length;
     return StringDataAndLengthByIdx(idx, &unicode_length);