Mr. Kennedy, a long-shot Democratic presidential candidate with surprisingly high polling numbers, said he wanted to close the Mexican border and attributed the rise of mass shootings to pharmaceutical drugs.