Context manager generator for retry block pattern and decorator.

This isn't setting the transaction level. What happens if it gets called inside a `set_mode_read_committed` block?