Log the launch command for Spark daemons

For debugging and analysis purposes, it's nice to have the exact command
used to launch Spark contained within the logs. This adds the necessary
hooks to make that possible.
Log the launch command for Spark executors
Make output formatting consistent between bash/scala
expose HDFS file system stats via Executor metrics
reformat registerFileSystemStat()
Java examples, tests for KMeans and ALS
- Changes ALS to accept RDD[Rating] instead of (Int, Int, Double) making it
  easier to call from Java
- Renames class methods from `train` to `run` to enable static methods to be
  called from Java.
- Add unit tests which check if both static / class methods can be called.
- Also add examples which port the main() function in ALS, KMeans to the
  examples project.

Couple of minor changes to existing code:
- Add a toJavaRDD method in RDD to convert scala RDD to java RDD easily
- Workaround a bug where using double[] from Java leads to class cast exception in
  KMeans init
Add a test case for random initialization.
Also workaround a bug where double[][] class cast fails
Fixed 3 bugs that caused UI to crash (including SPARK-810).

One bug caused the UI to crash if you try to look at a job's status
before any of the tasks have finished.

The second bug was a concurrency issue where two different threads
(the scheduling thread and a UI thread) could be reading/updating
the data structures in JobProgressListener concurrently.

The third bug mis-used an Option, also causing the UI to crash
under certain conditions.
Attempt to fix bug reported in PR 791 : a race condition in ConnectionManager and Connection
Change line size
Remove Java-specific constructor for Rating.
The scala constructor works for native type java types. Modify examples
to match this.
Remove extra synchronization in ResultTask
Using quotes when printing out command
Pull HBASE_VERSION in the head of sbt build
Merge pull request #775 from pwendell/print-launch-command

Log the launch command for Spark daemons
Merge pull request #799 from woggle/sync-fix

Remove extra synchronization in ResultTask
Refactored SparkListener to process all events asynchronously.

This commit fixes issues where SparkListeners that take a while to
process events slow the DAGScheduler.

This commit also fixes a bug in the UI where if a user goes to a
web page of a stage that does not exist, they can create a memory
leak (granted, this is not an issue at small scale -- probably only
an issue if someone actively tried to DOS the UI).
fewer words
Style fixes based on code review
Style fix: removing unnecessary return type