SGD: General Analysis and Improved Rates