Cherry-pick buildbot 95deef27d7c531ead19e0ac86a9aa1546d4ee7f9:

Re-run queries after certain OperationalErrors

Sometimes malformed SQL can generate an OperationalError, so this looks
at the message itself.  It's unclear how this will work with
localization.

The code uses an exponential backoff algorithm (with a relatively small
multiplier), and will retry for a day, which seems a reasonable
get-the-db-server-fixed time.

Fixes #2005.  Hoepfully for good!

BUG=620572

Review-Url: https://codereview.chromium.org/2103053002
2 files changed