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

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>