Gold settles higher, but logs 7th weekly loss