Refactor code around the Streams2 API of the socket
Allow the local address and allowHalfOpen options to be set by the user
Bump version number to 0.4.0