Cognitive Development and Infectious Disease: Gender Differences in Investments and Outcomes