Fix TaskTest.nmap6 test

Fix #756.

Don't assume that thread scheduling is deterministic or that
Thread.sleep can be a form of synchronization.
(One could maybe also remove the Thread.sleep calls, to speed up the
test). Depending on the actual intent of the test, this might or might
not be appropriate.
Ah, makes sense.
The thread IDs are a neat idea. I prefer the thread names, since IDs might be reused. I'm dropping the waiting times since they aren't guaranteed to help. I coded this up, and after using a non-default thread pool (the default one is bounded), I could see six threads.