Gold ends sharply lower on selling pressure, but logs weekly advance