add a consistency check on the final environment

Specifically, check that fully instantiated terms
with cstrs on them satisfy those cstrs.