Bug #720154 - [IMAPx] Silently recover from "Connection reset by peer" error

This is a partial commit for the bug, to address "Connection reset by peer"
errors, and even the BYE response from the server, more gracefully, like
reconnecting to the server and re-issue the job. There will be at least
one more commit for this bug report, for an NNTP provider.