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
Before your change, the time variable used here was the same used in the stats hash. Now they are different. Is that a problem?