Whoever wins faces a litany of crises, including Islamist insurgencies, shortages of cash, fuel and power.