NotifyStop and WaitForStop

Now we can correctly wait for the thread object to stop after we notify
it...or wait until it stops on its own, but that is unlikely to happen.
But it seems robust enough that we can continue development now. It is
good enough for thread objects to also contain and control other further
thread objects.