Carlos Sainz will team up with Stefan Vandoorne at McLaren next season.