Generalized pyramids of biomass in ecosystems