Fix compilation with -property and reduce the number of Clock.currTime() calls.
Use core.cpuid.threadsPerCPU to determine the number of worker threads.

Question is if this needs to be multiplied by the number of CPUs on multi-CPU systems...
Reimplemented TaskMutex for proper thread-safety and increased performance in situations without contention.
Merge remote-tracking branch 'upstream/master'