A developmental timer that regulates apoptosis at the onset of gastrulation