South Koreas impeached president detained in martial law investigation