gold settles lower for the week, gains for the quarter