A survey of thousands finds that our mood during the young adult years is a good predictor of later happiness in retirement. Christie Nicholson reports