A South Korean court has ordered the release of impeached President Yoon from jail, marking a major legal and political development in the country.