Former South Korean President Yoon Suk Yeol has been sentenced to life in prison for his brief imposition of martial law to suppress the opposition.