HPCC-12046  Implementation of stats in thor

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
HPCC-12046 Clean up and remove unused code

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