Scotland’s largest building society is to be put on the market by the government after it effectively collapsed.