TEZ-1637. Improved shuffle error handling across NM restarts.
Contributed by Rajesh Balamohan.