HPCC-11937 Fix race condition in smart join

HPCC-11953 Throw error when RIGHT rows would be lost

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
We could perhaps (in debug mode) extend our critsecs so that we stored the threadID of the lock holder, and then add a assertLocked() method that would check the threadId of the lock holder matched the current threadID ?