Primoz Roglic became the first Slovenian to win a Grand Tour event as he triumphed at the Vuelta a Espana following Sunday's final stage in Madrid.