Improved quadrature formulas for boundary integral equations with conducting or dielectric edge singularities