Cleaned up Semaphore::wait(uint64).
Added code for TaskProcessor::nextTask to check to see if there is a next task.