Biodiversity in soil ecosystems: the role of energy flow and community stability