On the Evolution and Optimality of Mood States