verified match_type algorithm

(follows the implementation in HOL4)
can be used for evaluating is_instance
minor cleanup, and fix for new hypsets
fix const command, using new verified match_type
work towards subst command

reduced to making evaluation good for VSUBST and INST (the problem is
VARIANT).
define EVAL-friendly version of INST and use in subst_rule