Vincenzo Nibali won his first stage in five years, while Egan Bernal and Geraint Thomas sealed a Team Ineos one-two in the general classification