A relentless surge in the price of gold is delivering windfalls across emerging markets, boosting investor confidence in countries that mine and buy the metal.