Add decorator to pause and debug sporadic exceptions.

The thought is that this may be useful for debugging exceptions that occur
sporadically on staging: manually instrument the offending function with
`@pause_on_exception`, then when it happens again you can jump into pdb and see
what's happening.