bugfix for #79411 Connect with invalid password exits 

This is a fix for [Bug #79411 for Net--RabbitMQ: Connect with invalid password exits](https://rt.cpan.org/Public/Bug/Display.html?id=79411)

The problem was that write was called on closed sockets. That caused
SIGPIPE signals that weren't handled.

It is fixed by introducing write_ignore_pipe_signal() that sets up a
short-lived signal handler SIGPIPE that simply ignores the signal
while write() is called.

write_ignore_pipe_signal() is now called everywhere that write() used to
be called directly.