generalized task_manager::calculate_new_state to take arbitrary steps into account