Loop operators and S-duality from curves on Riemann surfaces