Trump's apparent willingness to exit a pact with Iran could undermine negotiations with another adversary: North Korea.