History of infertility and risk of type 2 diabetes mellitus: a prospective cohort study