SPARK-2134: Report metrics before application finishes

Yup, there's no graceful shutdown. You could add a JVM shutdown hook, but then that might interact badly with our unit tests. How stale are metrics if you don't call this? I.e. are there some data sources that will stall forever? Because the Worker and Master aren't tracking very fine-grained events, just application start / stop events.