Dunfermline building society sold after regulator refuses bailout