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
Remove Java-specific constructor for Rating.
The scala constructor works for native type java types. Modify examples
to match this.
Merge pull request #786 from shivaram/mllib-java

Java fixes, tests and examples for ALS, KMeans
Merge remote-tracking branch 'origin/master' into branch-0.8