simplify the logic in TaskSchedulerImpl
revert
Merge branch 'SPARK-2294' of https://github.com/CodingCat/spark into SPARK-2294
revert