Fix rate calculation

- Fix the bug: rate reset on every success request
- add some tests to check high level behaviour of circuit_breaker
- make rate information public through public method
Do we need this assertion here? If 'some errors were counted', would the assertion at line 98 fail as well making this one redundant?