The travel ban revives an effort from President Trump’s first term that led to chaos and court battles.