Initialize the rest of libcore's native code.

This native code requires NewGlobalRef, so this patch also implements
NewLocalRef/DeleteLocalRef, NewGlobalRef/DeleteGlobalRef, and
NewWeakGlobalRef/DeleteWeakGlobalRef.

(The assembler change is because "math.h" also defines OVERFLOW. A slight
change in #include ordering caused the names to conflict.)

Change-Id: Ifbf3b532ec3b0896bd7507d2881c6b77b64f01e7
diff --git a/build/Android.test.mk b/build/Android.test.mk
index 3f5673c..22209ec 100644
--- a/build/Android.test.mk
+++ b/build/Android.test.mk
@@ -32,10 +32,10 @@
   LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
   LOCAL_SHARED_LIBRARIES := libarttest libartd
   ifeq ($(1),target)
-    LOCAL_SHARED_LIBRARIES += libdl libicuuc libicui18n libstlport libz
+    LOCAL_SHARED_LIBRARIES += libdl libicuuc libicui18n libnativehelper libstlport libz
     LOCAL_STATIC_LIBRARIES := libgtest libgtest_main
   else
-    LOCAL_SHARED_LIBRARIES += libicuuc-host libicui18n-host libz-host
+    LOCAL_SHARED_LIBRARIES += libicuuc-host libicui18n-host libnativehelper libz-host
     LOCAL_WHOLE_STATIC_LIBRARIES := libgtest_host libgtest_main_host
   endif
   ifeq ($(1),target)