[SPARK-4717][MLlib] Optimize BLAS library to avoid de-reference multiple times in loop

Have a local reference to `values` and `indices` array in the `Vector` object 
so JVM can locate the value with one operation call. See `SPARK-4581` 
for similar optimization, and the bytecode analysis.