Analysis of stochastic approximation for efficient least squares regression and LSTD