Frequency dependence of the conductivity and dielectric constant of La2CuO4+y near the insulator-metal transition