Moon Jae-in, a former human rights lawyer, is near the first liberal president of South Korea in 10 years, ending a decade of conservative rule.