Formulation and integration of continuous and discontinuous quadratic boundary elements for two dimensional potential and elastostatics