gold futures rise amid safe-haven demand, dollar weakness