HPCC-8882 Move commonext into thorhelper and thorutil

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