[WIP] Implementing Averaged SGD

Working on implementing averaged SGD for both classifier and regressor for #543
I would write the mathematical equivalent in a comment next to each of these lines