Remove need for tracking of used ids by keeping track of the old contexts ...

... and substitutions instead. Marginally increases memory usage (may
not even increase it at all!) and saves 50% running time or more.
simplification by removing code in TypeCheck