Ferrero has clinched a deal to buy Nestle's confectionery business in the US.