The European Union has agreed on new rules aimed at cutting the amounts of methane emissions produced in the energy sector.