Context manager generator for retry block pattern and decorator.

I think calling this something like `RetryManager`, and then having a `conditional_retry` alias might make the intent clearer.