Move the constants of ZooKeeperLauncher to the companion object.
Add Mongo trait.

MongoController can be mixed only in Controller. Add Mongo trait that can be
composed into any Scala class.
Rename SystemMetricsActor to SystemMetricsMonitor.

SystemMetricsMonitor is a more appropriate name because it is used to monitor
different types of system metrics.
Introduce SystemMetricsSupervisor.

This patch makes SystemMetricsMonitor a child of SystemMetricsSupervisor.
SystemMetricsSupervisor will supervise system metrics related actors.
Write system metrics to the database through SystemMetricsWriter.

Make SystemMetricsSupervisor query the current system metrics every 10 seconds
and write them to MongoDB's "admin.metrics" collection through
SystemMetricsWriter.
Use Map.empty for empty receive.

{ case _ => } siliently ignores any message given to this function. This makes
debugging hard. Use Map.empty instead so that
akka.actor.UnhandledMessage(message, sender, recipient) will be published to
the ActorSystem's EventStream.
Turn akka.actor.debug.unhandled on only in dev mode.

This option converts UnhandledMessages into actual Debug messages. This is
useful in dev mode, but too verbose in other modes.
Use type safe ActorPath instead of String.

ActorPath provides convenient methods such as / to construct a child path.
Don't hardcode the name of BeyondSupervisor.

Add BeyondSupervisor.Name field to be consistent with other actors.
Remove unused import.
Add GameEvent trait.

GameEvent simply logs all GameEvents for now. For analysis, this behavior
must be changed to write to HDFS.
Emit "User Login" and "User Logout" events.

Include "username" field when emitting these events.
Move SystemMetrics actors to beyond.metrics package.
Add trackUser method to GameTrait.

trackUser automatically adds username field from implicit request parameter.
Add a method to get the current classpath.

Play framework uses a custom class loader for auto-reloading in development
mode. So in development mode, we must join the class loader with the parent
class loader to get the complete classpath.
Add a method to get the current java binary path.
Add a method get the path for writing PID from configuration.
Move getProcessID method to BeyondRuntime as processID.
Make ZooKeeperLauncher fork ZooKeeperServer.

Currently, the lifecycle of ZooKeeper server is exactly the same to that of
Beyond instance. So whenever Beyond restarts, the ZooKeeper server also
restarts.

Unfortunately, this dependency causes unnecessary delay in Beyond shutdown.
When shutting down Beyond, the ZooKeeper server can be stopped before Apache
Curator connection to the ZooKeeper server is closed. In this case, Curator
tries to reconnect to the server for each pending operation, which causes
significant delay in shutdown.

This patch is the first step to separate the lifecycle of ZooKeeper server from
that of Beyond instance. ZooKeeperServerMainWithPIDFile is the main class to
execute ZooKeeper Server. It writes PID to the configured path and executes
ZooKeeper server. The next patch will make ZooKeeperLauncher kill the process
if it is not responding.