JNI: allow either JavaRef or bare objects in Java calls.

Introduce a temporary type JavaRefOrBare which can be constructed from
either a JavaRef or a bare object, and use it as the parameter type for
Java function stubs generated by the JNI generator.

This allows Java functions to be called using a mixture of both types,
so we can incrementally move to using JavaRef only.

Also replace NULL with nullptr in scoped_java_ref.{h,cc} as the
inconsistency looked weird.

BUG=506850

Review-Url: https://codereview.chromium.org/2219923002
Cr-Commit-Position: refs/heads/master@{#410377}
12 files changed