Make the channel implementation thread-safe(r) and add additional checks
for file descriptor validity.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl]

* util/TunnelChannel.java
  (TunnelChannel.nativeChannel): Use an atomic long to store the native handle.
  (TunnelChannel.TunnelChannel, TunnelChannel.isOpen, TunnelChannel.close):
   Update to use atomic operations.
* util/RequestChannel.java (RequestChannel.read): Properly detect a closed
   channel, and deactivate it if the underlying implementation threw
   an exception.
* util/ResponseChannel.java (ResponseChannel.write): As above.

[in subversion/bindings/javahl/native]

* org_apache_subversion_javahl_util_TunnelChannel.cpp
  (throw_IOException): Allow the APR status to be zero.
  (Java_org_apache_subversion_javahl_util_RequestChannel_nativeRead,
   Java_org_apache_subversion_javahl_util_ResponseChannel_nativeWrite):
   Throw an exception if the read failed.


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