HPCC-9707 Ensure scalar and set datasets are always hoisted

Has quite a big effect on a few complex archived examples.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
HPCC-9707 Correct indentation/move inline functions to main file

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #4650 from ghalliday/issue9707

HPCC-9707 Ensure scalar and set datasets are always hoisted

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>