The endogeneous choice of delegation in a duopoly with outsourcing to the rival