The defense secretary arrived unannounced Monday to assess America’s longest war as the Trump administration weighs sending more troops. The visit occurred as the Afghan army chief and the defense minister resigned following a deadly weekend attack by the Taliban.