Preserve currying in external type checker.

This causes a cascade of changes, notable that the internaliser now
has to handle tuples.  I also added a map of basic builtin functions
to Language.L0.Core.