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.
I'm confused by the 0.5 multiplier. Does it ramp up using this function until `allowedRequestsRatio` reaches 1, which will take time 2*`RecoveryDuration`? Or will it ramp up using this function for time `RecoveryDuration` and then jump from allowing 50% straight to 100%? Both behaviors seem surprising.