An Ecological-Thermodynamic Approach to Urban Metabolism