[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