Added function stop and test to Throttler.

As this tool is widely used I prefer to create a PR to add this feature and its test.