With its ruthless brand of extremism, the Islamic State is at risk of alienating the local population in the Iraqi territory it controls.