[SPARK-2359][MLlib] Correlations

Implementation for Pearson and Spearman's correlation.
Add after `{`. If it hits the line width limit, move `DenseVector(values.flatten.toArray)` to the next line.