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

I like it less, but it's a close #2 next to the existing pattern. I wouldn't object to keeping them the same or moving to your pattern.