[BRANCH-1.1][SPARK-4626] Kill a task only if the executorId is (still) registered with the scheduler

v1.1 backport for #3483