The GOP-controlled Senate overwhelmingly approved the measure, which the president has threatened to veto because it calls for changing the names of military bases honoring Confederate leaders.