Refactor out event logging and replaying logic from UI

This involves taking apart what was once GatewayUISparkListener, and introducing in its place
the EventLoggingListener and SparkReplayerBus (and AppNameListener, but this one is not important).
This allows the event logging and replaying functionalities to be used outside of the context of
the SparkUI.

This commit also ensures all file system modifications go through the Hadoop FileSystem. This
adds the functionality of reading event logs from HDFS. This also fixes a bug in which Spark
would attempt to create a log directory in the local file system when the path in fact refers
to an HDFS directory.
Add new constructors for SparkUI

For two reasons - first, the existing way is ugly because we have to instantiate the SparkUI
by calling new SparkUI(null). Second, this provides a way to configure the persisted port
through SparkConf.
Add a few configurable options to event logging

This includes compression and output buffer size.