South Korea Clears Way to Detain President in Martial Law Inquiry