Atmospheric Escape and Climate Evolution of Terrestrial Planets