A dynamical model of apoptosis and its role in tumor progression