The developmental high wire: Balancing resource investment in immunity and reproduction