Law enforcement officials said they feared the country’s political divisions could result in violence as threats against the president, members of Congress and judges are surging.