The real test for the country and Middle East will come when triumphant but disparate rebel factions seek to divvy up power