Remi Cavagna capped a memorable Stage 19 at La Vuelta by holding off a fast-finishing pack to claim a fine solo triumph.