President Trump’s top envoy in the war against the Islamic State extremist group, Brett McGurk, has resigned, disagreeing with the president’s decision to pull all U.S. troops out of Syria within a short deadline, officials familiar with the decision said.