SPARK-2099. Report progress while task is running.

This is a sketch of a patch that allows the UI to show metrics for tasks that have not yet completed.  It adds a heartbeat every 2 seconds from the executors to the driver, reporting metrics for all of the executor's tasks. 

It still needs unit tests, polish, and cluster testing, but I wanted to put it up to get feedback on the approach.
I think there is an unlikely race here where (a) a task heartbeat gets enqueued to be sent (b) the task actually finishes and that message is sent, then taskIdToTaskSetId is cleared (c) the heartbeat arrives. This is possible since the heartbeater and the task execution itself are in different threads. Then you'd get an NPE here. Though extremely unlikely, it might be good to just log a warning and pass if the task set is not found.