South Korean opposition parties have submitted a motion to impeach the president after he declared martial law only to reverse the move hours later, triggering the biggest political crisis the country has faced in decades.