HPCC-10296 Optimize the nextRow() calls in thor

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