The survival, recovery, and diversification of metazoan reef ecosystems following the end-Permian mass extinction event