A Functional Model of Hierarchy: Why, How, and When Vertical Differentiation Enhances Group Performance