Add array support and type exceptions to generated native method object casting

Even though String is an object (and so being casted to jobject across
the jni boundary would make sense), the JNI spec gives special treatment for java
string types and they're casted to jstrings instead of jobjects. This
change makes sure Strings stay as Strings in the native method declaration.
Previously all non-primitive types would be casted to objects.

Also fixed a bug where void was being cast to object (this happened because
void is non-primitive).

Also adds better array support. Arrays with a primitive component type
will stay as primitive arrays but arrays with a non-primitive component type
will be casted to an object array.

Change-Id: If795bcddf7a38f051d0c6fb515e1dd320dd3f30d
Bug: 898261
Reviewed-on: https://chromium-review.googlesource.com/c/1297083
Commit-Queue: Aiden Benner <abenner@google.com>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602230}
1 file changed