Serialize intialization of the JavaHL native library, otherwise there's
too much room for race conditions, especially in multithreaded clients.

* subversion/bindings/javahl/native/JNIUtil.cpp
  (GlobalInitGuard): New class, effectively a gate that controls acces
   to the initialization code.
  (JNIUtil::JNIGlobalInit): Use GlobalInitGuard.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_NativeResources.cpp
  (Java_org_apache_subversion_javahl_NativeResources_initNativeLibrary): Return
   the result of JNIUtil::JNIGlobalInit.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
  (NativeResources.initNativeLibrary): Change signature to return a boolean
   success flag.
  (NativeResources.init): Raise an exception if initializing the native library
   does not succeed.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1519803 13f79535-47bb-0310-9956-ffa450edef68