Move non-JVM-specific conc code out of src/vm/jvm.

This makes it clearer what bits are JVM-specific and need abstracting
or porting.
Re-work Thread class using new nqp::ops.
Move Thread.pm to src/core, now it uses nqp:: ops.
Add Thread.pm to MoarVM build.

No, don't expect it to work yet.
Use ReentrantMutex REPR and new ops for Lock.

Means it is no longer tied to the JVM.
Move Lock.pm out of src/vm, now it's VM-generic.
Add Lock.pm to Rakudo Moar build.

With this we pass S17-concurrency/lock.t under Moar.
Add Scheduler role to the build.

Doesn't contain anything JVM-specific already.
first (nonworking) draft of Semaphore class
Switch Channel to use ConcBlockingQueue REPR.
Channel is now not JVM-specific; more to src/core.
Switch ThreadPoolScheduler to ConcBlockingQueue.

Still a number of JVM-specific things to go in the scheduler, however.
Further reduce JVM-ness of ThreadPoolScheduler.

With this, the use of AtomicInteger is eliminated in favor of a lock
(for now; we can do better in the future when we've atomic ops). The
timer related bits are still JVM-specific, but now conditionally built
for the JVM, and we just throw an exception on Moar. Means we can use
the non-timer bits of the scheduler on Moar initially.
Move ThreadPoolScheduler into src/core/.

The JVM-specific bits are conditionally compiled for JVM now.
Add Semaphore and ThreadPoolScheduler to Moar.
Merge branch 'nom' into moar-conc
Switch Promise to use portable lock.
Another step towards portable Promise.

Now it depends only on the JVM semaphore.
Implement Lock::ConditionVariable.
Switch Promise to use cond var, not JVM semaphore.

A condition variable is a much better construct to be using here,
especially when a semaphore granting many permits is not portably
available.