A Gauss-Seidel type solver for special convex programs, with application to frictional contact mechanics