gold ends lower, logs fifth weekly loss in a row