Introduce circuit breaker middleware

Circuit breaker watches the error condtion to match, after what it activates the fallback scenario, e.g. returns the response code.
The lock here is only needed for the TimeProvider used in testing. It seems a little cleaner to move the lock out of here and into the TimeProvider, e.g. https://github.com/mailgun/timetools/pull/2.