Begin work on splitting L0 into internal and external language.

Still very broken.
More work on the external/internal split.

Now compiles, although with many modules disabled, but it still does
not function correctly.  Work continues.
Fix some errors in internalisation and compiler pipeline.
Add support for tupleless SOACs to internaliser.
Change tupleless SOACs to never return 1-tuples.
Revert "Change tupleless SOACs to never return 1-tuples."

This reverts commit 835079643808b44b5c3b5e9fe1848377063b5e57.
Further work on external/internal split.

This commit removes some now-unnecessary code, and merges a few things
that can be shared between external and internal representation.
Remove unused things from Language.L0.Attributes.
Fix enabling optimisations and other things.
Tweak how bindings are inserted.
Some more improvements of let-binding in internaliser.
Factor compiler pipeline into separate module.
Fix internaliser binding-insertion for loops and let-withs.
Fix oversight in expNames.
Fix scanT/reduceT handling in internaliser.
Small cleanups.
Tweaks to internal L0 construction.
Permit internal L0 trace function to take several arguments.
Improve internal type checker error messages.
More fixes to internaliser.