gold dawdles to end record-breaking year with modest gains