index.js: use TokenBucket algorithm for throttling, closes #50