sendmail: Add retry logic
sendmail: Add retry logic

An exception showed up today in production logs like:

  SMTPDataError: (451, b'4.3.0 Mail server temporarily rejected message. z63sm3579046itf.23 - gsmtp')

This caused two bad things:

1) Not handling the exception caused confusion in run_update logic.
The worker resent the build-passed status update after getting an HTTP
500 error. However, the logs to the run got lost.

2) We should retry on an SMTP error.

This adds retry logic and makes sure an exception doesn't bubble up
if/when SMTP issues happen.

Signed-off-by: Andy Doan <09032574f02f3d5e4e489a718b8705f28c474e94@linaro.org>

linaro-technologies/jobserv,linaro-technologies/jobserv