Make dependent/existential types explicit in the language.

Not quiiiite done yet, but it at least compiles.
Add Substitute instances for ExtShape and ExtDimSize.
Some more work.

Certain recursive functions now type-check!
More things work
Work on type-checking existentially quantified shapes.
Rename combineResTypes to generaliseResTypes.
Fix type-checking of existentially typed loops.
Add ppBinding convenience function.
Fix loop rewriting rules.
Document loopResult a bit
Fix code generation and interpretation of loops.
Fix input reading.
Fix shape returns from functions.
Fix code generation of existentially typed code.
Add a few more simple test programs.
Better notation for existentials.
Remove unnecessary use of splitting.
Add nice little regularity test.
Remove unnecessary splitting module.