Earth's atmosphere is both sustainer and destroyer of life. Gabrielle Walker discovers surprises in how it does so