[SPARK-3377] [SPARK-3610] Metrics can be accidentally aggregated / History server log name should not be based on user input

This PR is another solution for #2250 

I'm using codahale base MetricsSystem of Spark with JMX or Graphite, and I saw following 2 problems.

(1) When applications which have same spark.app.name run on cluster at the same time, some metrics names are mixed. For instance, if 2+ application is running on the cluster at the same time, each application emits the same named metric like "SparkPi.DAGScheduler.stage.failedStages" and Graphite cannot distinguish the metrics is for which application.

(2) When 2+ executors run on the same machine, JVM metrics of each executors are mixed. For instance, 2+ executors running on the same node can emit the same named metric "jvm.memory" and Graphite cannot distinguish the metrics is from which application.

And there is an similar issue. The directory for event logs is named using application name.
Application name is defined by user and the name can includes illegal character for path names.
Further more, the directory name consists of application name and System.currentTimeMillis even though each application has unique Application ID so if we run jobs which have same name, it's difficult to identify which directory is for which application.

Closes #2250 
Closes #1067
I see. The fact that it has to be an `Option` for a different reason why it had to be an `Option` in the first place. Here we need it to default to `None` if we load it from a log that doesn't have this field, but before this patch it would also be `None` if the scheduler may not provide us with an ID. I guess that means we can never change this then...

I think at the very least we should add a comment above `SparkListenerApplicationStart` explaining why application ID is an option. It's not at all intuitive to me why it has to be an option when all live applications will always pass in an ID.