[SPARK-2359][MLlib] Correlations

Implementation for Pearson and Spearman's correlation.
Right, we also need to maintain the list of original row ids. If a column only has one distinct value, groupBy may not work well either. We use Long ids. With a 100MB buffer, we can handle 12M entries. I hope it is already large enough for practical use. The groupBy operator may trigger a global shuffle, which is slow. Please check whether we can use the `RangePartitioner` obtained from `sortByKey` in groupBy so it doesn't trigger a global shuffle.