Toms Skujins soared past Thibaut Pinot in the final sprint to become the first Latvian to win Tre Valli Varesine.