Which three events caused serious damage to Confederate morale and ultimately led to the Confederacy’s defeat