[SPARK-2359][MLlib] Correlations

Implementation for Pearson and Spearman's correlation.
I need the exact index of each entry in order to compute accurate ranks in the case of duplicate values. Doesn't seem like zipWithUniqueId allows me to do that esp when duplicate values fall into different partitions. Suggestions on making it work with zipWithUniqueId?