Rate-limiting for master
This merge request adds support for rate-limiting to master (for plugins flow, fake and refused).
Rate limiter is implemented as a token bucket. Every time message (containing N records) arrives to those plugin, N tokens is substracted from client's bucket. If bucket contains less then N tokens, the message is ignored. Tokens are periodically added to bucket. This should allow storing short unexpected peaks, but it should stop flooding our database.
Numbers of tokens have to be adjusted, I just put there some wild guesses. I would suggest taking some "normal amount" of records per some time unit, multiply it by some constant (3? 5? 10?) to have some reserve and set that value as the limit. This has to be set separately for each plugin.
Also I'm leaving for consideration if this rate limit should be in configuration file or just in the code (now it's in the code).