Merge "Added a new JNI helper for logging exceptions. Plugged some JNI reference leaks in existing JNI helpers." into kraken