Creates an engine that tracks at most maxTenants tenants.
Evaluates whether a request from tenantKey, which must come from the
authenticated principal, is within its quota, and records it if so.
The payload size is only counted: the server's body limit bounds it.
OptionalcontentLength: numberClears all tenant tracking state (primarily for test environments).
In-memory tenant store using a sliding-window token bucket algorithm.
The store is bounded: once it holds
maxTenantsentries, the least recently used tenant is evicted. An evicted tenant starts again with a full bucket, so the bound trades a little precision for fixed memory.