An al-Qaeda offshoot in Yemen says it masterminded the deadly attack on French satirical magazine Charlie Hebdo.