Thermodynamic extremization principles and their relevance to ecology