gold erases gains, turning lower as the dollar gains