Viñales ends fantastic rookie season with win