Worm algorithm for two-dimensional spin glasses.