[WIP] Refactor of SGD code to use only one call to plain_sgd/average_sgd

This code also makes all methods private and extracts the multiprocessing function into a helper function. Also note that this does not change the functionality of the code at all, it just makes it more clean and maintainable in my opinion. 
why do you need this?

alpha is not an init param