HPCC-10313 Stop Ws_fs/WsWorkunits Schedule thread correctly

In Debug mode, when EclWatch ESP stops, stacktrace shows by the
destructor of the thread. It is because the thread is still running
in an infinite lop. This fix adds a 'stopping' flag and a semaphore
into the thread. When the ESP stops, the flag is set to true and
the semaphore is signaled, which breaks the lop. No stacktrace
shows.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Merge pull request #5448 from wangkx/h10883

HPCC-10313 Stop Ws_fs/WsWorkunits Schedule thread correctly

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>