The proposed solution
Rather than granting every ethnic group a state of its own, the state should change to a union of ethnic groups. Take Afghanistan for example. Rather than having a central government controlling all the resources of the country, and catering to the wishes of the majority, there should be a government for every individual group, which can then vote in a council to implement decisions that affect all of them. Decisions that affect only a particular group should be taken by each group individually.
This system seems familiar, doesn't it? Well, that is one of the ideas behind a federal government system, like is implemented in Germany, the United States and Nigeria, for example. The problem with the federal government system is that there is too much power at federal government level, and that if the largest ethnic group were to decide to form a voting bloc, none of the other ethnic groups could get any measure passed.
So I suggest that the concept of state be eroded till it is hardly existent. What should remain should be unions of ethnic groups, or interest groups, that wish to represent themselves under one authority. These groups can vote every 10 years to join any other union, and the members of the union can then vote to accept this new member.
The union does not have an army; each union member should have an army/police force if it wishes. Every member of the union signs a contract to protect every other member from attack, and should there dissent within the union, the union votes to remove the offending member, then mobilizes against that member.
The European Union is on the correct path towards the idea I represent here. However, the groups in that particular union are simply the old city-states, with a central recommendation panel, and not really a union.
Africa as an example
Africa was worst hit by the colonisation drives of the Europeans, in part because it has the largest number of different ethnic groups, and because the countries were arbitrarily demarcated, often with razor sharp lines. Clashes between ethnic groups are common in Africa, and many civil wars for independence have plagued this continent.
If the countries were converted to unions, for example the "Union of Ghana", each ethnic group would be in control of its economy, its resources, and its security. The ethnic groups could then decide if they at all want to be a part of Ghana, where a certain ethnic group has a significant majority. Often, they will not go off to form their own country, because there is little economic inviability in an ethnic group of 600 000 people forming a country. Also, because each ethnic group is independent from the other, and determines its own future, tensions will drop significantly. Staying in the union will mean that there are no borders between the ethnic group, and there is a common currency and police force. So there will be impetus for staying in unions.
At the same time, there will always be conflicts between minority groups and majority groups. Traditionally this would result in one ethnic group picking up arms, and rebelling, provoking destruction of property and loss of life. In the case where the ethnic groups are part of a union, and not part of a country as currently existent, the ethnic group simply votes to leave the union, and closes its borders to the belligerent group.
When the warring groups become independent from one another, and shut down contact between the group members, violence between the two rivals will drop. This means that there is much more of a chance that there will be a political dialogue, and not mutual armed aggression. Also, when the rivals discover how difficult it is living apart (no more trade, no more loans, a new currency), there will be a move towards peace. Many rebel leaders often do not appreciate how difficult it is to run a country.
Take the lower coast of West Africa for another example. This region has a great many ethnic groups which are stuck in the one country or the other. Often, ethnic groups are more interlinked with groups from other countries, like the Hausa in Northern Nigeria and Niger.
If these groups had a choice, they could vote to combine together, leading to a homogenous (implying conflict free) union in the middle north of Africa. Of course, the unions will not, and should not encourage ethnic homogeneity. So, the Fulani, which are nomads that live together with the Hausa, would find it advantageous to join the Hausa union. For the Hausa union, it would be advantageous if they could get the southern coastal tribes (which are usually have small populations) to join their union, because that is where the oil is. So there will be a move to make the Hausa union economically advantageous to all other groups in the area, and there will be a sustained impetus to keep it attractive, seeing as the oil rich areas can vote to leave the union at any time.
So, in effect, what happens is a free market competition for the various groups, where it doesn't matter what their size is, but only how rich they are. Somewhat like the European union, where countries have to meet certain economic criteria to join in, certain groups can form unions, where a certain economic ability is necessary to join in. This way, there will be impetus to improve the economical situations in many of the African countries.
Aggression and Empire Building
Every once in a while, somebody thinks he has thought up the perfect form of governance. There will come some point, where the idea of having a huge empire will be back en vogue, and some country will attempt to conquer union states, and subjugate them, perhaps to take over control of their resources.
Well this is actually a good thing. Think of it as the Kuwait-Iraq problem. Kuwait is small and weak. Iraq is big and strong. Kuwait has oil, Iraq wants oil. Why can Iraq not simply take over Kuwait? Because Kuwait has a partnership with the United States.
Two people could find an oil field in their backyard, and decide to declare a group, and vote to leave whatever union they are living in. But to be able to stay independent, they will need to join some other union (like with the U.S.), which can defend them. And when they do that, their entry conditions will probably stipulate that they give up a part of the oil they have to the United States (which has a large population). So that oil they drilled will be spread more evenly among the worlds population, and not be confined to the two people.
With these fluid unions, there can unions that are spread all over the world. They do not have to be geographical neighbours. That way, groups that are comfortable with one another interact with one another, and those that are not do not have to do so. The result will be a more stable world, with less conflict, and more power to the people.