Modification of water/oil and water/gas relative permeabilities after polymer treatment of oil or gas wells