detect rate limit has been reached

x-ratelimit-remaining will be checked now and we give a warning before(!) the rate limit will be reached (and of course WHEN it has been reached, too). the warn threshold is set to 5 but could be increased/decreased if you like.