HPCC-8928 Optimize a few minor uses of NOT(expression)

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

HPCC-8928 Optimize a few minor uses of NOT(expression)

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>