The resilience of coral reefs and its implications for reef management