(PUP-3379) Only rescue exceptions we intend to retry
Previously, we rescued all StandardErrors, checked if the rescued
exception is in the list of rescue-able exceptions, and re-raised if it
wasn't in the list.
Also, the caller was expected to specify the list of rescue-able
exceptions as a Hash, where the key was the exception, and the value was
the message to log when the exception was caught. That seemed a little
odd, and if that behavior is actually wanted, it would be better for the
caller to supply a callback for logging the message.
This commit modifies the retry action to accept an array of rescue-able
exceptions. If none are specified, it defaults to StandardError. The
retry action will only catch exceptions that it intends to retry,
simplifying the retry logic.