Refugees had been arriving in the United States at levels unseen in nearly three decades, aided by nonprofits and ordinary people across the political spectrum.