Fix for Sockets and SIGPIPE

On Unix systems, when a socket is open and writing and the receiving socket is closed during the write, a SIGPIPE signal is generated. If left un-handled (which is the default), the SIGPIPE will terminate the process. At best this leads to inconsistent use of `Socket` across platforms, and at worst it makes `Socket` very unreliable to use on Unix platforms (especially Mac OS X and iOS).

By ignoring the SIGPIPE when Socket is initialized, we can avoid this problem. This is the same approach used in `boost::asio`.