HPCC-9694 - Global LOOP filter condition fails

A LOOP with a filter condition and a global loop query, will fail
if the slaves finish after a different number of iterations,
which is very likely.

Ensure that keep iterating until all have signalled finished.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge branch 'hpcc-9694' into candidate-4.0.2

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>