Remove unused import.
Send UpdateRoutingTable message directly to UserActionSupervisor.

RoutingTableWorker's parent is no longer BeyondSupervisor, so it is incorrect
to send UpdateRoutingTable to its parent. Also there is no need to go through
BeyondSupervisor because BeyondSupervisors simply forwards the message to
UserActionSupervisor.
Split RoutingTableWorker into WorkerRegistrationActor and RoutingTableUpdateActor.

RoutingTableUpdateActor performs two independent tasks: worker registration and
routing table update. Split RoutingTableWorker into two actors and make each actor
perform only one task.
Make LeaderSelector a field.

curatorResources is no longer needed because the LeaderSelector instance is
available as a field and we can close it directly in postStop().
Rename routing table actors appropriately.

Currently, the names of routing table actors are confusing because we use
'update' with different meanings in different contexts. Use names from the
perspective of ZooKeeper so that update menas znode update and watch means
znode watch.
Remove unnecessary try/catch block.

cache.getListenable.addListener(this) never throws an exception.
Make names more specific.

Names such as Address, Hash and Server are too generic. Rename them to
RouteAddress, RouteHash and RouteHashAndAddress respectively to reflect that
they are used only when calculating routing table.

Also add a comment which shows the format of RoutingAddress:
e.g., "127.0.0.1:8080"
Add an extractor for RouteAddress.

This patch introduces an extractor for RouteAddress which is handy for parsing
RouteAddress into IP and port. The extractor will be used later in management
console to gather list of workers.

Change the return type of BeyondConfiguration.currentServerAddress to
RouteAddress to make it explicit that it returns an instance of RouteAddress
that can be parsed with the extractor.
Rename currentServerAddress to currentServerRouteAddress.

Because currentServerAddress returns an instance of RouteAddress, it is
appropriate to rename it to currentServerRouteAddress.
Fix a typo.

NonHeapMemoryUsageReply -> NonHeapMemoryUsageRequest.
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.