For the first part, if you start your trip in Europe and fly to Africa you cannot come back to Europe (even in transit to S America) unless your path there passes through Ghana or Nigeria. But CAI is in Europe, so perhaps you can find a cheap RT from there to Madagascar, then continue as you suggested. If it fits your plans you may also want to look at your eastbound choices. Then you can leave Africa to Asia or Australia.