[MRG] 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. 
Ok, that's not a problem, I will take revert this change and put the alpha back. Thanks for the feedback!