Former US ambassador to the UN, who advocated military strikes in North Korea and Iran, replaces Lt Gen HR McMaster.