Gold reverses course to finish flat, shaking off stronger dollar