Functionality for retrying calls on network related errors.

Can specify number of attempts, interval time and a callback to be notified of errors.