[SPARK-2261] Make event logger use a single file.

Currently the event logger uses a directory and several files to
describe an app's event log, all but one of which are empty. This
is not very HDFS-friendly, since creating lots of nodes in HDFS
(especially when they don't contain any data) is frowned upon due
to the node metadata being kept in the NameNode's memory.

Instead, add a header section to the event log file that contains metadata
needed to read the events. This metadata includes things like the Spark
version (for future code that may need it for backwards compatibility) and
the compression codec used for the event data.

With the new approach, aside from reducing the load on the NN, there's
also a lot less remote calls needed when reading the log directory.
Let's add a quick comment here:
```
/**
 * Return whether the specified event log is in the legacy file structure.
 * Previously, the event log of an application comprises of multiple files in a directory.
 * As of Spark 1.3, these files are consolidated into a single one that replaces the directory.
 * See SPARK-2261 for more detail.
 */
```