The World Economic Forum at Davos has ended with a mixture of mild optimism and caution for the global economy.