IMPALA-2252: Crash (likely race) tearing down BufferedBlockMgr on query failure
IMPALA-2252: Crash (likely race) tearing down BufferedBlockMgr on query failure

When running certain heavy workloads it was observed that a
'RuntimeState' member variable was being accessed in WriteComplete()
on a RequestContext::Cancel() path after that RuntimeState object was
destroyed. This is a temporary fix to ensure that the destroyed member
variable is not accessed if the write status is cancelled.

A test is not included as it is not deterministically reproducible.

Change-Id: I8a55c070d25f0ca5c830a955e84df450061753a3
Reviewed-on: http://gerrit.cloudera.org:8080/897
Reviewed-by: Sailesh Mukil <a0dfbcae8e92bb4f48772d8c6743e175570f6f74@cloudera.com>
Tested-by: Internal Jenkins

cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice