IOSessionImpl: double checks removed as the only blocking operation is close()
IOSessionImpl.toString() synchronized scope reduced a bit, also avoid StringBuilder buffer copy on IBM JVM (nothing changes for OpenJDK)