Gold gains amid N. Korea tensions, but heads for 2nd weekly decline