An Exergy-Based Model for Population Dynamics: Adaptation, Mutualism, Commensalism and Selective Extinction