Add global limit to PoolCounter

Adds a 'slot' option to $wgPoolCounterConf. When this option is set,
there are a limited number of slots for the given worker type,
regardless of key. Workers with the same key are still limited by
the 'workers' option.

The global limit is implemented by simply using a deterministic
hash of the key instead of the real key. This avoids deadlocks,
but results in slot underallocation due to hash collisions - even
when there are significantly more jobs that slots, some of the slots
might remain empty.

Bug: 65691
Change-Id: Ibdf8ec222f9756d70de2bed7ff14913351dc394b
Merge "Add global limit to PoolCounter"