Remove pad word from arrays

This change removes the 4 byte pad from all arrays except longs and
doubles. It saves 76kb from the boot image, and will also reduce the
size of arrays in the heap (and thereby reduce garbage collection).

Change-Id: I3ff277d5bf14c57c0f7552215818e588ec6cc275
diff --git a/src/jni_internal.cc b/src/jni_internal.cc
index 60e34ba..04832c7 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -2053,9 +2053,14 @@
     return NewPrimitiveArray<jshortArray, ShortArray>(ts, length);
   }
 
-  static void* GetPrimitiveArrayCritical(JNIEnv* env, jarray array, jboolean* is_copy) {
+  static void* GetPrimitiveArrayCritical(JNIEnv* env, jarray java_array, jboolean* is_copy) {
     ScopedJniThreadState ts(env);
-    return GetPrimitiveArray<jarray, jbyte*, ByteArray>(ts, array, is_copy);
+    Array* array = Decode<Array*>(ts, java_array);
+    PinPrimitiveArray(ts, array);
+    if (is_copy != NULL) {
+      *is_copy = JNI_FALSE;
+    }
+    return array->GetRawData(array->GetClass()->GetComponentSize());
   }
 
   static void ReleasePrimitiveArrayCritical(JNIEnv* env, jarray array, void* data, jint mode) {