[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.