private static class RateLimitingSearcher.AvailableCapacity
This keeps track of the current "capacity" (total cost) available to each client (rate id)
across all threads. Capacity is supplied at the rate per second given by the clients quota.
When all the capacity is spent, no further capacity will be handed out, leading to request rejection.
Capacity has a max value it will never exceed to avoid clients saving capacity for future overspending.