make throttle threadsafe

This is from elasticsearch/logstash#1469

It makes throttle theadsafe