Function decoration for pluggable backoff and retry