Refactor `Ratelimiter` to limit the amount of expensive config value accesses.