South Korean president clings to power after martial law U-turn