The Google matrix controls the stability of structured ecological and biological networks