HPC-8245 - Avoid deadlock potential whilst flushing

Need to avoid holding a shared lock whilst appending to row
arrays. Otherwise, roxiemem's spilling callback could stall if
the append causes a row array resize

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