Gold settles slightly lower as stocks rise, dollar drifts higher