Donald Trump has laid the way for an increase in US troops in Afghanistan, vowing he would "fight to win" America's longest war.