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.
Unfortunately we have to lock to make sure our assumption about states are are correct, otherwise states may be changed by other goroutines while we make our transitions