ART: aarch64 jni compiler needs to extend small return types

As aarch64 calling convention does not mandate extension on return
values anymore and leaves the upper bits undefined, the jni compiler
needs to sign- or zero-extend the returned values when necessary.

As three architectures need extension now, refactor this fact into a
flag into a virtual method.

Add tests to JniTest that exercise the required extension.

Change-Id: Idebb7c4dedebb852e58ade63e1c2b1eeced23104
diff --git a/compiler/jni/quick/mips/calling_convention_mips.h b/compiler/jni/quick/mips/calling_convention_mips.h
index e33fbad..8d82dce 100644
--- a/compiler/jni/quick/mips/calling_convention_mips.h
+++ b/compiler/jni/quick/mips/calling_convention_mips.h
@@ -71,6 +71,11 @@
   ManagedRegister CurrentParamRegister() OVERRIDE;
   FrameOffset CurrentParamStackOffset() OVERRIDE;
 
+  // Mips does not need to extend small return types.
+  bool RequiresSmallResultTypeExtension() const OVERRIDE {
+    return false;
+  }
+
  protected:
   size_t NumberOfOutgoingStackArgs() OVERRIDE;