Al-Qaida and the Islamic State are both adopting AI – but differ in how they think about the technology