IMAP savemessage(): Don't loop indefinitely on failure
IMAP savemessage(): Don't loop indefinitely on failure

We were retrying indefinitely on imapobj.abort() (as that is what
imaplib2 suggests), but if the failure occurs repeatedly, we'll never
quit this loop. So implement a counter that errs out after unsuccessful
retries.

Signed-off-by: Sebastian Spaeth <98dcb2717ddae152d5b359c6ea97e4fe34a29d4c@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <347709267ddd1958560c4c317ea3fd613f10a719@laposte.net>

frioux/offlineimap,frioux/offlineimap