With most of the results now in from South Africa's election, the long-ruling African National Congress (ANC), will have to contend with sharing power after a historic loss of its parliamentary majority.