libmn: remove giant system lock

The primesieve example decreased in performance when enabling
true parallelism in 71516f8c99ac02f2e66fa0d7559a0b988aca74cd because
of high contention for the giant "system lock." This commit removes
that lock and redesigns the scheduler to work with more fine-grained
locking. On my machine primesieve now runs in 26% of the time than
before this commit.

Each worker now has its own queue of threads to run and
the problem of the scheduler is now to load-balance across these queues
while minimizing cross-worker contention for a worker-specific queue.

We choose an optimal queue for a thread when schedule() is called but
this generates more cross-worker contention than is strictly necessary. It is
probably better to implement a "work stealing" method
(http://supertech.csail.mit.edu/papers/steal.pdf) since that only
requires cross-worker contention when absolutely necessary and it
can be done in batches.