HPCC-12446 Prevent a potential deadlock in IRowMultiWriterReader

Also, common up some code in this area.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>