The unanimous Senate vote came after a disturbing series of attacks on political figures, and the bipartisan legislation now creates some of the toughest penalties in the nation for politically motivated violence.