Fast rates for unbounded losses: from ERM to generalized bayes