A Theory Of Demographic Optimality In Forests