HPCC-9618 - Improve distribute abort handling

Hash distribute could deadlock if an exception occurred in
the receiver or a write handler. In either case, the handling
must ensure that the sender and it's write handlers are told to
abort.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Minor change following review
Merge branch 'hpcc-9618' into candidate-4.0.2

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>