Expose aplication ID in ApplicationStart event, use it in history server.

This change exposes the application ID generated by the Spark Master, Mesos or Yarn
via the SparkListenerApplicationStart event. It then uses that information to expose the
application via its ID in the history server, instead of using the internal directory name
generated by the event logger as an application id. This allows someone who knows
the application ID to easily figure out the URL for the application's entry in the HS, aside
from looking better.

In Yarn mode, this is used to generate a direct link from the RM application list to the
Spark history server entry (thus providing a fix for SPARK-2150).

Note this sort of assumes that the different managers will generate app ids that are
sufficiently different from each other that clashes will not occur.
Actually that's not true. It creates a new map only when there are new or updated logs.

The new map is needed because we want to have things in order (decreasing end time) when listing apps. When you have a map, that means you have to use a linked hash map (so that iteration order is predictable).

You could manually keep a map and a list, I guess, which is kinda what LinkedHashMap does anyway. But that sounds like more work for no gain that I can see.