Williams-Sonoma swings to profit in Q3, beats Street