Averages for the l-torsion in class groups