HPCC-10296 Optimize a the nextRow() calls in thor

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