SI-8494 Restore filtering javap output

Regressed in support for new delayedEndPoint, where it must
pick what to filter for.

`s/claas/klass/` and similar.
SI-8494 Javap filter includes specialized

When filtering javap output, include specialized versions
of methods. For anonfuns, in particular, the apply$sp is
the method of interest.
SI-7577  Incorrect documentation: current default isn't Vector

Fixed documentation to specify List in four cases where it was wrong or missing.
SI-8638  Empty UnrolledBuffer hangs on prepend.

Tracked down bug to incorrect recursion in insertAll.  Fixed by adding a missing case (which incidentally will provide better performance when adding to the end of a block).

No specific tests, as this is caught by quasi-complete collections tests.
SI-5200  Incorrect advice for implementing mutable.Set in scaladoc

Fixed advice; it was already there in mutable.SetLike but a case sensitivity error kept it from appearing.
SI-8335  List.++ avoidably burns memory

Changed to check the identity of the CanBuildFrom instead of the identity of the generated builder to shortcut building.  Should reduce memory churn on ++ a little.
SI-7115  JMapWrapper.get can incorrectly return Some(null)

This isn't incorrect.  Trying to use a single-threaded interface in a concurrent context is supposed to break in various unpleasant ways.

Documentation has been added to encourage one to avoid wrapping a concurrent map in the generic wrapper (which assumes a single thread), and pointing out that synchronized maps do not maintain synchronization for non-atomic operations (including get).

More docs.
SI-8703 add support for blocks with just a single expression to quasiquotes

Previously it was impossible to match a block that was constructed as

    Block(Nil, term)

Due to the fact that quasiquotes always flatten those into just term. This is
a correct behaviour for construction (for sake of consistency with parser) but
doing it in deconstruction mode make it impossible to match such blocks which
could have been constructed manually somewhere.

To fix this we just disable block flattening in deconstruction mode.
Interestingly enough this doesn't break existing code due to the fact that
quasiquote's block matcher also matches expressions as single-element blocks.

This allows to match single-element blocks with patterns like q"{ $foo }".
Merge pull request #3834 from Ichoran/issue/7577

SI-7577  Incorrect documentation: current default isn't Vector
Merge pull request #3839 from Ichoran/issue/7115

SI-7115  JMapWrapper.get can incorrectly return Some(null)
Merge pull request #3841 from Ichoran/issue/5200

SI-5200  Incorrect advice for implementing mutable.Set in scaladoc
Merge pull request #3840 from Ichoran/issue/8638

SI-8638  Empty UnrolledBuffer hangs on prepend.
Merge pull request #3788 from som-snytt/issue/8494

SI-8494 Restore filtering javap output
Merge pull request #3842 from Ichoran/issue/8335

SI-8335  List.++ avoidably burns memory
[backport] SI-8677 Duration: Zero - Inf should be MinusInf

Fixes #8677. Add basic tests.
This is a backport from 2.12.x of dead39dc5f21c6eac41788e93426c50ddd398c24.
Unclutter Reporter. Move truncation to ReplReporter.

Refactor to reduce the Reporter interface. Working towards
minimal interfaces in scala.reflect.internal that can be consumed by sbt/IDE/....
The scala.tools.nsc package is entirely private to the compiler (in principle).

A `Reporter` should only be used to inform (info/warning/error). No state.
Ideally, we'd move to having only one reporter, whose lifetime is adjusted
appropriately (from per-run in general to per-context for type checking,
so errors can be buffered -- "silenced" -- during nested type checking calls).

Start the clean up by moving truncation to the REPL,
since it's not relevant for regular reporting. Perversely, we were checking
truncation all the time, even though it's only on during a repl run.
(Truncation is now always turned off in the repl under -verbose.)

Untangle error resetting on symbols from error reporting (reportAdditionalErrors).
This fixes a nice&subtle bug that caused feature warnings to be suppressed under
`-Xfatal-warnings`:

```
def reportCompileErrors() {
  if (!reporter.hasErrors && reporter.hasWarnings && settings.fatalWarnings)
    globalError("No warnings can be incurred under -Xfatal-warnings.")

  if (reporter.hasErrors) { ... }
  else {
    // will erroneously not get here if
    // `reporter.hasWarnings && settings.fatalWarnings`
    // since the `globalError` call above means `reporter.hasErrors`...
    allConditionalWarnings foreach (_.summarize())
    ...
  }
}
```

The second `if`'s condition depends on the `globalError` call in the first `if`...
Pure refactor: reorder definitions
Move reporting logic into Reporting trait

Move code from Global/SymbolTable to separate Reporting traits to
start carving out an interface in scala.reflect.internal.Reporting,
with internals in scala.tools.nsc. Reporting is mixed into the cake.
It contains a nested class PerRunReporting.

Should do the same for debugging/logging.

The idea is that CompilationUnit and Global forward all reporting
to Reporter. The Reporting trait contains these forwarders, and
PerRunReporting, which accumulates warning state during a run.

In the process, I slightly changed the behavior of `globalError`
in reflect.internal.SymbolTable: it used to abort, weirdly.
I assume that was dummy behavior to avoid introducing an abstract method.
It's immediately overridden in Global, and I couldn't find any other subclasses,
so I don't think the behavior in SymbolTable was ever observed.

Provide necessary hooks for scala.reflect.macros.Parsers#parse.
See scala/reflect/macros/contexts/Parsers.scala's parse method,
which overrides the reporter to detect when parsing goes wrong.
This should be refactored, but that goes beyond the scope of this PR.

Don't pop empty macro context stack.
(Ran into this while reworking -Xfatal-warnings logic.)

Fix -Xfatal-warnings behavior (and check files): it wasn't meant to
influence warning reporting, except for emitting one final error;
if necessary to fail the compile (when warnings but no errors were reported).
Warnings should stay warnings.

This was refactored in fbbbb22946, but we soon seem to have relapsed.
An hour of gitfu did not lead to where it went wrong. Must've been a merge.
Uniformly route reporting through reporter.

Sharpen interfaces, reduce footprint of Reporting trait.
Ideally, all reporting should indirect through reporter,
and the `Reporting` trait itself should be restricted to
a single method that retrieves the current `reporter`.

Pull up some more reporting to reflect.internal.
Would like to do more, but need to move partest to the
reflect.internal interface first.
(Its `errorCount` relies on `ERROR.count` in `tools.nsc.Reporter`.)
Track symbol that caused a deprecation warning.

So that we can filter deprecations based on defining package.

Configurable error reporting will support a rule like:
"In compilation unit X, escalate deprecation warnings that
result from accessing members in package P that have been deprecated
since version V. Report an error instead of a warning for those."

TODO: remove deprecationWarning overload that doesn't take a `Symbol`?
(Replace by a default value of `NoSymbol` for the deprecated symbol arg?)