The evolution of life histories : theory and analysis