Structural and dynamical heterogeneity in ecological networks