For those worried about a nuclear war between North Korea and the United States, the weekend disclosure by Secretary of State Rex W. Tillerson that the two nations were in direct communication was a rare glimmer of hope that a diplomatic resolution to the standoff might be possible. But President Trump’s remarkable public rebuke of Mr. Tillerson’s efforts — he said the nation’s top diplomat was “wasting his time” — was a sharp reminder of how difficult it will be for the two sides to reach an agreement even if they begin serious talks.