Coordination, Specialization and Incentives: An Equilibrium Model of Firm Boundaries