As the government develops its response to Islamist terrorism, it should look closely at countries that have already confronted and contained it.