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>
Merge pull request #5511 from ghalliday/issue10983

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>