Measurements of capillary pressure and electric permittivity of gas-water systems in porous media at elevated pressures: Application to geological storage of CO2 in aquifers and wetting behavior in coal