HPCC-11712 - Avoid write lock on disconnect unless neeeded

A connection disconnect was grabbing an exclusive lock to the
shared dataRWLock unconditionally, when it only needed it if it
was altering the store. This was causing extra contention and
thread serialization.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #6120 from jakesmith/hpcc-11712

HPCC-11712 - Avoid write lock on disconnect unless needed

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>