A trade-off between resistance to infection and reproduction in primate evolution