Retry a promise-returning or async function. Abstraction for exponential and custom retry strategies for failed operations