[BRANCH-1.2][SPARK-4614][MLLIB] Slight API changes in Matrix and Matrices

This is #3468 for branch-1.2, same content except mima excludes.

Author: Xiangrui Meng <meng@databricks.com>

Closes #3482 from mengxr/SPARK-4614-1.2 and squashes the following commits:

ea4f08d [Xiangrui Meng] hide transposeMultiply; add rng to rand and randn; add unit tests
[BRANCH-1.2][SPARK-4583][MLLIB] LogLoss for GradientBoostedTrees fix + doc updates

We reverted #3439 in branch-1.2 due to missing `import o.a.s.SparkContext._`, which is no longer needed in master (#3262). This PR adds #3439 back to branch-1.2 with correct imports.

Github is out-of-sync now. The real changes are the last two commits.

Author: Joseph K. Bradley <joseph@databricks.com>
Author: Xiangrui Meng <meng@databricks.com>

Closes #3474 from mengxr/SPARK-4583-1.2 and squashes the following commits:

aca2abb [Xiangrui Meng] add import o.a.s.SparkContext._ for v1.2
6b5564a [Joseph K. Bradley] [SPARK-4583] [mllib] LogLoss for GradientBoostedTrees fix + doc updates