Make the rate-limit enforcement stricter.

In the previous form the throttling mechanism was not doing anything.
Use a macro instead of the magic numbers.

This commit has no functional effects.
Merge pull request #403 from pooya/shayan/fix_rate_limit

Shayan/fix rate limit