Metabolic theory of ecology