Lots of work on type checking core.typed's implementation.

Currently stuck on recursively defined protocols, eg. IScope.
[CTYP-33] Support Vars as functions.