Slab: Allowing concurrent allocations without locking
Every active thread now gets its own page from which it allocates
blocks. This enables concurrent allocations without much contention,
alleviating the need for mutex locking over Slab allocations,
effectively making Slab lock-free.
This adds some overhead in case every thread just allocates one item and
finishes, yet these situations should not happen too often and/or have
too large impact, so we don't need to care much. If something like this
happens, though, please cry. We'll cry with you, for sure.
Also there is a cleanup routine now which has to run often enough to
ensure that pages with some freed blocks get available for allocations.
This rework also changes the API of slabs, requiring an event list to
send cleanup events to, to be passed to sl_new().