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
Minor cleanups and comments in GenBCode
Comment summarizing the JVM spec for InnerClass / EnclosingMethod
Remove unnessecary check when computing InnerClass attribute flags

The final flag is computed correctly by javaFlags.
Pattern matching on ClassBType extracts the inernalName
Clean up and document some usages of flags in the backend
Support writing classfile of version 52
Documentation for isModuleClass
Remove invalidation from Global.scala

The invalidation has been introduced in these commits:

https://github.com/scala/scala/commit/167309afd10f9b65b35e6874a30ea6340a1ddc44
https://github.com/scala/scala/commit/ace051ff0abe112b767c3912f846eb4d50e52cf5
https://github.com/scala/scala/commit/e156d4a7cf4afdab91b7c281a0e8ae6e4743cc4a

It's safe to remove this functionality. It was added originally to support an experiment with resident compilation. The experiment was performed in sbt and dropped in  https://github.com/sbt/sbt/commit/6def08e029e474dc35af04b7403a2aeaddd0dec6

Since then Scala team concluded to not work on resident compilation so it's safe to delete unused code.
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.