[SPARK-2359][MLlib] Correlations

Implementation for Pearson and Spearman's correlation.
"Breaking ties" is a loose description of what happens. I actually need all items of the same value in the same partition in order to take the average of their positions in the sorted list. I'm open to suggestions on how to make it work with mapPartitions though.