American presidents have long pressed for their NATO partners to commit more financing and other resources, but Mr. Trump and Jim Mattis, the defense secretary, have gone a step further, suggesting that the United States might reduce its contribution if other countries do not increase theirs.