Mondelez International has confirmed it is closing a confectionery plant in Spain as a result of its plans to sell a clutch of European factories and brands.