The State Department designated three branches of the group Ansar al-Sharia as foreign terrorist organizations on Friday, including two branches that officials said were involved in the Sept. 11, 2012, attacks on the U.S. diplomatic compound in Benghazi, Libya.