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
Instead of using a comment, you could move this calculation into a method the explains what you are doing, something like `align_time_window_to...[SOMETHING]`. I understand what you are doing here but it's hard to figure out why.