[SPARK-4562] [MLlib] speedup vector

This PR change the underline array of DenseVector to numpy.ndarray to avoid the conversion, because most of the users will using numpy.array.

It also improve the serialization of DenseVector.

Before this change:

trial	| trainingTime | 	testTime
-------|--------|-------- 
0	| 5.126 | 	1.786	
1	|2.698	|1.693	

After the change:

trial	| trainingTime |	testTime	
-------|--------|--------
0	|4.692	|0.554	
1	|2.307	|0.525	

This could partially fix the performance regression during test.

For SparseVector, is it more efficient to save as indices and values as two objects? In the current version, on the python side we need slicing `pairs[:l*4]`. I don't know whether slicing is implemented with copying or not.