Do more battle with the poll interface.

This fixes an annoying edge case, where input files larger than the buffer size,
but where a socket is disconnected and poll signals POLLHUP which means that
write is never executed (and the problem was thus never noticed). This did not
prevent mails being sent, but it did lead to extsmaild consuming too much CPU
until a socket was reconnected.