Most Democrats left President Trump conspicuously unmentioned as they cheered a potential end to the conflict, reflecting the tricky politics around the war and their party’s deep hostility to Mr. Trump.