SI-8589 Performance improvement for ArrayCharSequence.toString
[backport] SI-7470 implements fundep materialization

Backports 21a8c6c from the 2.11.x branch under -Xfundep-materialization
as per Miles Sabin's request. Thanks Miles!
pull request feedback
[backport] transformers no longer ignore UnApply.fun

Backports 7122560063 and 4133eb8454 from the 2.11.x branch
Merge pull request #3752 from jeroentervoorde/SI_8589

SI-8589 Performance improvement for ArrayCharSequence.toString
Eclipse project: repl depends on compiler/lib projects
Minor cleanup in AbstractReporter.
Regularize `comment` hook method

This is currently pretty borken,
but let's at least not clutter innocent
interfaces with this functionality.

Moved `comment` (as `signalParsedDocComment`) next to
the other hook methods in `Global`. For now, it calls
the old `reporter.comment` hook method.

As soon as the IDE is refactored to receive comments properly,
the deprecated `Reporter#comment` method can be removed.
Move more parsing hooks out of reporting.

Create a trait Parsing, which, like Reporting,
factors our functionality from Global (aka. "the cake"),
that is related to global aspects of configuring parsing.
Remove another redundant forwarder

In this case, `infer.issue -> context.issue`.

Forwarders are dead weight that cause bit rot.

They tend to acquire functionality,
clutter their defining interface and
dilute the purpose of the method they forward to.
Simplify (ambiguous) error issuing.

The two functional differences are:
  - always add the diagnostics string
  - check erroneousness in `issueAmbiguousTypeErrorUnlessErroneous`,
    before even constructing the error message.

Consider this nugget:

```
-    def issueAmbiguousError(pre: Type, sym1: Symbol, sym2: Symbol, err: AbsTypeError) {
-      issueCommon(err) { case _ if ambiguousErrors =>
-        if (!pre.isErroneous && !sym1.isErroneous && !sym2.isErroneous)
```

I'd like to state for the record that the if-erroneous in the
case of the partial function looked super-dodgy: it meant that,
when `ambiguousErrors`, `issueCommon` would not get to the `else` branches
that buffer or throw, and if the erroneous condition was met,
nothing would be issued/buffered/thrown.

This refactoring checks this condition up front.
Concretize diagnostics: one boolean suffices for now.

Once we get the next diagnostic, lets encapsulate them in an
object, with a boolean flag for each one when it needs to trigger,
and a nice message that should be presented to our delighted user.

A list of Strings that is searched by contents is a bit fragile,
and can't be very fast either.
Add errorCount to wean partest off Reporter$Severity

Once a release with this method is out,
move partest to use errorCount and cut ties with the Severity
nested class, so we can move it to the right enclosing class.
Clarify divergentError comment
Extract the `makeNonSilent` method.

Setting the scene of removing the reporting mode bits from `contextMode`.
Encapsulate `TryTwice` as a class, move to `Context`.

All functionality that's closely tied to the error buffer should be in
`Context`'s reporting infrastructure. (called `ContextReporter`, soon to follow.)
Restrict `contextMode` fiddling to `Context`

Introduce `initRootContext` to set the relevant bits.
Rely less on intricacies of `contextMode`-based reporting.

 - when warning must not be suppressed, use `reporter.warning`
 - don't (implicitly) rely on `reporter.warning` being silent after typer
   --> don't do pure expression check after typer
Make more explicit that TypeError is being thrown.

`typer.TyperErrorGen.MacroCantExpandIncompatibleMacrosError`
throws because the type checker it uses is at `NoContext`,
which throws by default... This default is bad and is going to change,
so make this code independent of that future sanity.

TODO: don't use mutable state to determine position for the error
Reduce Context iface: inline trivial forwarders.

The overarching goal is to route all contextual reporting
through a single entry point: `context.reporter`.

The following commits take baby steps towards this goal.