U.S. President Donald Trump was due to end a brief trip to Qatar with a speech to U.S. troops on Thursday then fly to the United Arab Emirates, where leaders hope for U.S. help to make the wealthy Gulf nation a global leader in artificial intelligence.