Updated mediawiki/extensions
Project: mediawiki/extensions/PoolCounter  f01dd4a4c00e9299b504f1850ce3a0cbe2b077db

Adds support for taking multiple locks

Extends both the daemon and client.

Daemon
------
Extends the daemon to allow clients can now take up to four locks.  They are
allowed to specify a timeout on any of the locks.  Once client may loack the
same key twice but this has no special handling so it consumes to spaces in
the active list and requires unlocking twice.

We do no special deadlock detection and rely on timeouts to prevent long
deadlocks.  So you should be careful when taking multiple locks and follow
some rules:
1.  Always lock keys in the same order.
2.  Never try to acquire a lock you already have.

Its probably also a good idea to have two classes of keys - keys for which
you always specify 0 timeout (instant timeout) and keys for which you may
specify a timeout.  Furthermore its probably right to only ever acquire one
of the keys for which you may specify a timeout.  Doing otherwise could lead
to confusing backlogs.  On the other hand, if the one of the keys is very
granular this might not apply.  Just be careful, I guess.

Four locks was chosen because its twice as many as I think I'm going to need.
Chosing a limited number of locks means this change won't require any more
mallocing - just slightly more memory per connection.  Its also simpler to
implement.

Client
------
The client gets special handling of keys that start with "nowait:".  Those
keys _must_ have 0 timeout.  The client prevents locking multiple
non-"nowait:" keys at once because this is unlikely to be a good idea.
Waiting while you have a lock that others might be waiting for is a really
good way to cause resource exhaustion and potentially deadlocks.

Change-Id: Ie282b8486c7bad451fbc5fb9a8274c6e01a728a7