HPCC-10983 Don't constant fold to avoid expression duplication in optimizer

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
HPCC-10983 Use a simpler method of preventing recursive hoisting

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
HPCC-10983 Simplify code following review

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
HPCC-11226 Add NULL check added to master in another commit

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

HPCC-10983 Don't constant fold to avoid expression duplication in optimizer

Reviewed-By: Jamie Noss <james.noss@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>