Gold closes slightly higher in choppy trade, after China devalues yuan