Fix ill-typed debugging function
Make use of unfolded primitive projections when elaborating match on a
primitive record.
To stay closer to non-primitive projections, only unfold primitive
projections in cbv when delta _and_ beta flags are set. Add test-suite
file for bug 3700 too.