libdeng2|Socket: Added an error signal, improved closing

Apparently closing the socket was blocking if the socket was
connecting to a host when Socket::close() was called.