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>
Ok that makes sense about locking once rather than per access. My comment about inline, doesn't apply. I didn't understand why yo removed them and stated that they needed to be locked before the call (accessed within a lock) so assumed that there was someone odd reason for needing to do this, some hierarchical  object reasoning etc. Then I realised that they where 'inline' so didn't understand how locking before the call could make any difference. I realise now that the comment is there because you removed the internal locks and thus they must NOW be accessed within a lock.