Six international oil and gas companies have agreed to slash their emissions of methane, a potent greenhouse gas.