[SPARK-2359][MLlib] Correlations

Implementation for Pearson and Spearman's correlation.
This function could be further simplified since you have an object map. Querying on the map directly should be sufficient. Iterating over its entries is not necessary.