Scientists studied 2,500 coral reefs to figure out how to save them