The Senate confirmed Tulsi Gabbard, a veteran and former Democratic congresswoman, as director of national intelligence in a 52-48 vote.