Environmental Stress Can Favor Cooperation by Triggering an Adaptive Race Between Cooperators and Cheaters