Strengthen static types of Inst lattice functions

Use parametricity and higher-rank types to force the lop-sided callbacks to
use only non-recursive Insts.
Fix an infinite loop on a malformed NamedInst

While trying to print out a malformed inst is a good idea, it is not a good
idea to try to reduce it first, as that might trigger the malformedness
assertion.
Merge branch 'master' of github.com:nwf/dyna