gold ends lower as investors trim exposure