On Empirical Risk Minimization with Dependent and Heavy-Tailed Data