New Year’s Eve celebrations were canceled or restricted in several major cities amid terror threats, with authorities citing crowd risks and recent attack warnings.