Make ircecho more resilient to server disconnections.

Catch the exception that is thrown when attempting to write to a
disconnected server, so that the thread that is handling that write is
not terminated.

Log the skipped messages on stdout, but do nothing else.

Change-Id: If721e402094a62a8c9b069a357b83d163a3f07d0