US President Donald Trump abruptly fired his national security adviser, who was widely known to have pressed the president for a harder line on countries such as North Korea.