ISTANBUL — A suicide bomber attacked the American Embassy in the Turkish capital, Ankara, on Friday, detonating himself inside a security entrance to the compound in a blast that officials said killed a Turkish guard and wounded a visiting Turkish journalist. The Obama administration called the attack an act of terror and warned American citizens to temporarily avoid its diplomatic missions in Turkey.