The Cohen–Lenstra moments for functions fields and stable homology of Hurwitz spaces