Another round of scary indirect ref changes.

This change adds a not-really-working implementation to Jni.c, with
various changes #ifdefed throughout the code.  The ifdef is currently
disabled, so the old behavior should continue.  Eventually the old
version will be stripped out and the ifdefs removed.

This renames the stack's "localRefTop" field, which nudged a bunch of
code.  The name wasn't really right before (it's the *bottom* of the
local references), and it's even less right now.  This and one other
mterp-visible constant were changed, which caused some ripples through
mterp and the JIT, but the ifdeffing was limited to one in
asm-constants.h (and the constant is the same both ways, so toggling the
ifdef won't require rebuilding asm sources).

Some comments and arg names in ReferenceTable were updated for the
correct orientation of bottom vs. top.

Some adjustments were made to the JNI code, e.g. dvmCallMethod now needs
to understand if it needs to convert reference arguments from
local/global refs to pointers (it's called from various places
throughout the VM).
diff --git a/vm/interp/Stack.h b/vm/interp/Stack.h
index f2a481b..22f066f 100644
--- a/vm/interp/Stack.h
+++ b/vm/interp/Stack.h
@@ -138,8 +138,12 @@
     const Method* method;
 
     union {
-        /* for JNI native methods: top of local reference storage */
-        Object**    localRefTop;
+        /* for JNI native methods: bottom of local reference segment */
+#ifdef USE_INDIRECT_REF
+        u4          localRefCookie;
+#else
+        Object**    localRefCookie;
+#endif
 
         /* for interpreted methods: saved current PC, for exception stack
          * traces and debugger traces */
@@ -191,16 +195,18 @@
 bool dvmPopLocalFrame(Thread* thread);
 
 /*
- * Call an interpreted method from native code.
+ * Call an interpreted method from native code.  If this is being called
+ * from a JNI function, references in the argument list will be converted
+ * back to pointers.
  *
  * "obj" should be NULL for "direct" methods.
  */
-void dvmCallMethodV(Thread* self, const Method* method, Object* obj,
-    JValue* pResult, va_list args);
-void dvmCallMethodA(Thread* self, const Method* method, Object* obj,
-    JValue* pResult, const jvalue* args);
 void dvmCallMethod(Thread* self, const Method* method, Object* obj,
     JValue* pResult, ...);
+void dvmCallMethodV(Thread* self, const Method* method, Object* obj,
+    bool fromJni, JValue* pResult, va_list args);
+void dvmCallMethodA(Thread* self, const Method* method, Object* obj,
+    bool fromJni, JValue* pResult, const jvalue* args);
 
 /*
  * Invoke a method, using the specified arguments and return type, through