Rewrite the serialization code of the I/O events coming in when
the Installed Packages Repository is modified (at filesystem level)
to better deal with bursts of events.
The new code uses a "baton" Semaphore as mutex that can be passed
through threads. The MainThread event handler function tries to
acquire the Semaphore in NB mode, if it does, it spawns a thread
that executes all the operations (acquire locks in blocking mode,
calculate updates, etc) and releases the Semaphore once done.
Olympic win!