Gröbner bases for spaces of quadrics of codimension 3