Util: function "finally" to deal more easily with exceptions
in type inference, manage scopes of variables: removed
the De Bruijn environment since untyped terms do not use De Bruijn, and
also use the hashtable structure to bind variables to types locally