Add BBOSH URLStreamHandlerFactorySpi implementation...

...and minor enhancements to TCP support to automatically close the socket when both input stream and output stream are closed.