HPCC-9161 Automatically hoist NOTHOR expressions outside of thor.

Todo:
* This might introduce THOR nodes inside a graph - they should be removed.
* actions/compounds need better transforming.

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