HPCC-10579 Improve many lookup join implementation in roxie

Additional refactoring following code review, and fix the stable sort version.

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