HPCC-12282 Simplify stats definitions so all done in one place

Also implement statistics gatherer that updates a workunit

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

Minor changes following code review

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
HPCC-12282 Move roxie global stats into new mechanism

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
HPCC-12392 Internal error in Roxie using -fdisableLocalOptimizations=1

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
HPCC-12282 Move roxie global stats into new mechanism

Refactor slave stats so they actually work

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
HPCC-12282 Move roxie global stats into new mechanism

Various issues found when testing:
1. Correct destruction order of activities versus indirect scopes, to prevent
intermittent core from CActivity destructor.
2. Fixed core in library1.ecl test, related to name changes (HPCC-12403)
3. Fixed assert error updating workunit stats

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #6524 from richardkchapman/stats-temp

HPCC-12282 Move roxie global stats into new mechanism

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>