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
because time window is implemented on cache expiration, and I can't inject time into the cache.