A long-term survey of more than 10,000 people finds that green spaces make for better moods. Christie Nicholson reports