Surging oil prices are hurting everyday consumers in Africa, but some oil-producing countries have seen a windfall with higher revenues — boosting investment spending in other areas.