Among the thousands of militia fighters who flocked to northern Iraq to battle the extremist Islamic State group over the summer was Qais al-Khazali.