[SPARK-2359][MLlib] Correlations

Implementation for Pearson and Spearman's correlation.
Make sure you use `preservePartitioning` correctly. My first understanding was wrong and I may have used it wrongly somewhere. The argument should really be called `preservePartitioner`. It passes the partitioner to the derived RDD without checking. This may lead to wrong results. For example, the join in the following code block returns nothing, though `c` and `d` have the same content.

~~~
val a = sc.makeRDD(Seq((0, 1), (2, 3), (4, 5), (6, 7)), 4)
val b = a.groupByKey()
val c = b.mapPartitions({ iter =>
    iter.flatMap { case (k, vv) =>
      vv.map { v => (v, k) }
  }}, true)
c.collect()
val d = sc.makeRDD(Seq((1, 0), (3, 2), (5, 4), (7, 6)), 4)
c.join(d).collect()
~~~