The adaptive significance of colonial nesting in a coral-reef fish