Restrict constant folding in typers to types.

This retains the original tree, which allows us to track
dependencies in the incremental compiler.

Term trees having a ConstantType are replaced by
literals in RefChecks, which gives the incremental
compiler a chance to perform dependency analysis.

TODO fold constants in annotation arguments, too.
This will require some rework of applyRefchecksToAnnotations
which currently only traverses, and doesn't transform.