[SPARK-2359][MLlib] Correlations

Implementation for Pearson and Spearman's correlation.
Hmm so one problem with the buffering approach for duplicates is that the uniqueIds for all the duplicate entries need to be saved in a list (since they're not necessarily sequential, so we can't do some kind of range thing). In the degenerate case where everything is a duplicate in a big RDD, this can be problematic (unless we want to get really fancy about saving ranges of IDs).