Socialist win in Catalonia draws line under separatist turbulence