Gold edges up as dollar slips, heads for fourth weekly loss