Improve JNI indirect ref diagnostics

Improved CheckJNI problem detection and failure reporting.  Also,
the indirect reference table data structure now responds to invalid
requests with a magic bogus object instead of NULL, so that failures
are immediate and obvious.

The extended checks in the indirect ref implementation are still on,
mostly so that bad code fails in an obvious way even when CheckJNI
is not enabled.

This change also includes a hack to allow weak globals to work.
Returning non-NULL for invalid refs turned a rarely-fails-weirdly
issue into an always-fails-loudly, which is good, but we need to
paper over it until the WGR fix is in place.  This will need to be
removed later.

Also, reduced some log levels.

Bug 4184721

Change-Id: Iaec75c71dbc85934366be2e717329b635d0fa49e
5 files changed