[SPARK-4467] Partial fix for fetch failure in sort-based shuffle (1.1)

This is the 1.1 version of #3302. There has been some refactoring in master so we can't cherry-pick that PR.