Community Structure and Diversity of Coral Reefs: The Role of History