As drilling for natural gas started to climb sharply about 10 years ago, energy companies faced mounting criticism over an extraction process that involves pumping millions of gallons of water into the ground for each well and can leave significant amounts of hazardous contaminants in the water that comes back to the surface.