Fix #1812, Symbols.mapSymbols shouldn't replace denotations
Fix #1812, Symbols.mapSymbols shouldn't replace denotations

It will use lazy types instead.
The current version transforms a type, with a context that has denotations
that may be forcefully replaced by mapSymbols. Types created during this
transformation may cache denots, that are-to-be replaced.
This is very problematic as this method is called from TreeTypeMap.withMappedSyms
in a fixed-point cycle, creating new symbols on every iteration. Those cached denotations
could make types keep symbols from previous iterations indefinitely.

The changed version does not transform the types eagerly, and instead makes them lazy.
Assuming there are no cycles, this should ensure correct ordering.
Unfortunatelly, at this point in the compiler we basically always touch everything,
and we can't even transform the info of denotation without this denotations info.
We basically have a chicked&egg problem here. To solve it, I use the same trick as used by
other lazy types by assigning an approximation of future type first.
This allows to pass the tests and makes dotty more robust, but I suspect this isn't a complete
fix and new similar bugs may arrive.

lampepfl/dotty,dotty-staging/dotty,som-snytt/dotty,dotty-staging/dotty,dotty-staging/dotty,dotty-staging/dotty,sjrd/dotty,som-snytt/dotty,som-snytt/dotty,lampepfl/dotty,lampepfl/dotty,som-snytt/dotty,sjrd/dotty,sjrd/dotty,som-snytt/dotty,sjrd/dotty,dotty-staging/dotty,lampepfl/dotty,lampepfl/dotty,sjrd/dotty