Prevent starvation in case of many concurrent requests and timeouts

In case there are many concurrent requests and the callbacks for the futures create more requests, there is starvation of existing requests. If there are timeouts involved, they may be triggered because of this starvation, but this is undesired behavior even without timeouts.
Also, in case there is a timeout, the id = nil line in flush_request_queue causes it to miss out on the event, which in extreme cases make cause the system to go into a state in which there are requests waiting, but they will never be sent.