Revert "Revert "MAPREDUCE-5924. Changed TaskAttemptImpl to ignore TA_COMMIT_PENDING event at COMMIT_PENDING state. Contributed by Zhijie Shen""

This reverts commit e4b60d671a319bbd2b54f389ef8f9cd8aadb029c.