SPARK-2127: Use application specific folders to dump metrics via CsvSink

Generate an unique app name which is used to create events and metric folders.
Forgot to mention that several sinks like CsvSink will be started in master and worker for standalone mode if configured, in this situation you may not get unique app name or SparkEnv (something created only when app started). So maybe you should consider this situation when there's no app name available.