Fertility, offspring gender, and parental mortality later in life