South Korea elects Lee Jae-myung president in an election marked by months of political turmoil after ousted former president Yoon Suk Yeol's abortive declaration of martial law.