Well-featured retry decorator.