An al-Qaeda affiliate has claimed responsibility for attacks in Burkina Faso that left 16 people dead, including eight gunmen, at the army headquarters and French embassy.