Rate-limit requests

Also automatically retries requests that were rate-limited
A semaphore, that is a bad name though.