[SPARK-2923][MLLIB] Implement some basic BLAS routines

Having some basic BLAS operations implemented in MLlib can help simplify the current implementation and improve some performance.

Tested on my local machine:

~~~
bin/spark-submit --class org.apache.spark.examples.mllib.BinaryClassification \
examples/target/scala-*/spark-examples-*.jar --algorithm LR --regType L2 \
--regParam 1.0 --numIterations 1000 ~/share/data/rcv1.binary/rcv1_train.binary
~~~ 

1. before: ~1m
2. after: ~30s

CC: @jkbradley
I thought about setting all zeros and then copy nonzeros when nnz is small. It may be faster but sparse->dense is not a common use case and I wonder whether we should do this optimization. And I don't know something as efficient as memset in Java.