Stochastic Primal-Dual Method for Empirical Risk Minimization with O(1) Per-Iteration Complexity