Former South Korean President Yoon Suk-yeol has been sentenced to life in prison on a charge of leading an insurrection by declaring martial law.