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
10 files changed