[SPARK-4907][MLlib] Inconsistent loss and gradient in LeastSquaresGradient compared with R

In most of the academic paper and algorithm implementations, 
people use L = 1/2n ||A weights-y||^2 instead of L = 1/n ||A weights-y||^2 
for least-squared loss. See Eq. (1) in http://web.stanford.edu/~hastie/Papers/glmnet.pdf

Since MLlib uses different convention, this will result different residuals and 
all the stats properties will be different from GLMNET package in R. 

The model coefficients will be still the same under this change.