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.
This comment is helpful, but having it right here misled me at first. After reading the comment I assumed that the job of `checkCondition` was to report whether now was the right time to check the condition. So I was confused when I saw a call to `setTripped` in the case that it was true. It might be clearer if you move this comment to within the `checkCondition` function. I think the reader of this part of the code doesn't need to know that detail yet.

You could also change the wording of the comment to something like:

    // Note that this call is less expensive than it looks -- checkCondition only performs the real check
    // periodically. Because of that we can afford to call it here on every single response.