[SPARK-1303]  [MLLIB] Added discretization capability to MLlib.

https://spark-project.atlassian.net/browse/SPARK-1303
values(i) -->> values.toArray(i)