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

No, I don't feel all that strongly about it, but neither does it strike me as awkward or a misuse of monadic operators.  Unit is a perfectly valid return type, and this is just idiomatic Scala -- which I prefer to use consistently over Scala written for non-Scala programmers.