I am of the considered opinion that the long-term solution to such problems lies in changing the mindset through sustained engagement and projection of real teachings of Islam so that no bigoted mullah, having a limited understanding of Islam, could exploit the religious feelings of people for ulterior motives.
Islam seeks to establish such a society where all citizens of the state enjoy equal rights and religion does not become the basis for any discrimination. Islamic law holds both Muslims and non-Muslims equal and no superiority or privilege is given to the Muslims on any ground. The history of Islam is replete with such examples. Once, a Muslim, who was accused of killing a non-Muslim, was presented in the court of Hazrat Ali (ra). The evidence supported the accusation. When Hazrat Ali ordered the Muslim to be killed by way of qisas, the relatives of the murderer made the brother of the killed forgive by paying him the compensation money. When the Caliph came to know of it, he asked, "Perhaps these people may have coerced you into saying so." To this, he replied in the negative, saying that the killing would not bring his brother back. Since they were paying him blood money, it would help the family financially to some extent. The Caliph agreed to the deal but added that the principle underlying the functioning of his government was "the blood of those of our non-Muslim subjects is equal to our blood and his blood money is like our blood money." (Abu Yusuf, Kitab-ul-Khiraj, p. 187)
Secondly, every member of an Islamic society is entitled to privacy and personal life. No one can be allowed to enter his house or interfere in his matters without his consent. The minorities enjoy similar rights in an Islamic state as the Muslims do. It is the fundamental principle of Islamic law that it enjoins the similar rights and duties on both Muslim and non-Muslim citizens without any discrimination.
Thirdly, Islam ordains people to worship Allah Almighty but it does not coerce followers of other religions to accept Islam and change their creed. Invitation to truth and use of coercion are mutually exclusive realities. The Holy Quran has communicated the Islamic message of truth in these words: "(O Glorious Messenger!) Invite towards the path of your Lord with strategic wisdom and refined exhortation and (also) argue with them in a most decent manner. Surely your Lord knows him well who strayed away from His path and He also knows well the rightly guided." (16:125)
Islam has strictly disallowed the adoption of such method of invitation, which affects the religious independence of the other party. Allah Almighty says at another place: "There is no coercion in religion. Verily, guidance has manifestly been distinguished from error." (2:256)
Fourthly, the non-Muslim minorities are free to undertake any business enterprise or profession in an Islamic state like their Muslim counterparts and no restriction can be imposed upon them in this regard. However, those businesses, which are collectively injurious for the society, would be completely prohibited both for the Muslims as well as the non-Muslims. The minorities are also free to adopt any profession they like. They would also be subject to same trade-related taxation as the Muslims.
Fifthly, as it is the responsibility of the Islamic state to provide for the disabled or the poor or the destitute or the old, in the same way, it is also under obligation to pay for the maintenance of a member of the minority community in case of his disability, old age or poverty. Minorities enjoy equal rights in terms of collective maintenance in an Islamic state. According to a tradition reported by Abu 'Ubaid in Kitab-ul-Amwal, "The Holy Prophet (PBUH) gave a donation to a Jewish family and it continued to be delivered even after (the Holy Prophet's departure from this world)."
Sixthly, Islamic state is responsible for the protection and security of minorities. If it has entered into an agreement with another nation, the protection and security of the latter also falls under its domain of responsibility.
One of the conditions that defined the agreements between Muslims and the conquered non-Muslim minorities was that the Islamic government would be responsible for provision of basic necessities and security of lives of the minorities. The Peace Agreement, which was struck with the residents of the Heera had the following written in it: "A non-Muslim who grows old and cannot work or becomes disabled due to a natural calamity or he was previously rich but has become poor due to some untoward happening, the government would not charge any tax from such calamity-stricken people. Rather these people and their families would be provided with the maintenance allowance out of official treasury." (Ibn Rushd, Badiyat-ul-Mujtahid, vol. 2, p. 310)
The minorities cannot be compelled to render defence services. Rather, it is the responsibility of the Islamic state to defend them. Since the Islamic state is responsible for the protection of lives, honour and property of the minorities and they do not have any other obligation with regard to defence, they are liable to contribute financially to the Islamic state in the form of a tax called Jizya. Even then, Islam has taught about justice and good manners when it comes to the imposition of Jizya on the minorities.
Due to space constraint, I cannot delve deeper into the Islamic history to prove empirically how minorities were treated in an Islamic state. The reprehensible Gojra-style incidents happen because of our society's lack of knowledge of actual teachings of Islam. The vacuum of knowledge so created is bridged by the semi-literate clergy with no exposure to the Islamic historical tradition, demands of contemporary age and challenges of future.