Network structure and stability criteria for complex ecological systems