[SPARK-4609] counting failures on host instead of executor

Executor will restarted with a new id, so counting number of failures based on executor id will not work in this cases, this patch change it to host.

After this change, one downside may be that the task can not be launched on other executors on the same host if it failed on one executor of them. All the executors on the same host share many resources, there is not a good reason that a task can succeed in other executors on the same host. So this will not be a problem.
can you change this to failedHostsForTask? I think that would make it more clear that the indices here are task ids (realize this isn't directly related to your change -- but would improve readability)