SI-6120 Suppress extra warnings

This is a mere polish for the fix to allow multiple warnings.

Sensibility checks in refchecks were shown to be redundant.

This commit includes a mild refactor to reduce tabbage, and
uses a local var to flag that a warning has already been emitted.

It would be better to have the checks return true if warned,
to facilitate `nonSensically || unrelatedly`, etc., but that's
a lot of `else false`.

The check files that were updated with the redundant warnings
are reverted.
duplicates macro arguments before expansion

As discussed with Jason, this is an important dimension of defenses that
we can build to ensure robustness of the macro engine.

This commit is important in the context of the upcoming patch to the
presentation compiler that will throw away expansions and keep original
macro applications (only when run in presentation compiler mode) so that
hyperlinking in macro arguments starts working in the IDE.

Duplication of macro arguments will make sure that macro arguments, which
are going to become exposed to the IDE, can’t become corrupted by possibly
misbehaving or misguided macros.
Merge pull request #3257 from xeno-by/topic/duplicate-macro-args

(2.11.0-M8) duplicates macro arguments before expansion
Merge pull request #3234 from retronym/ticket/5508-3

 Fix crasher with private[this] in nested traits
Merge pull request #3274 from retronym/ticket/8017

SI-8017 Value class awareness for -Ydelamdafy:method
Merge pull request #3276 from som-snytt/issue/6120-spurious-check

SI-6120 Suppress extra warnings
More robust hyperlink tests for the presentation compiler

Report null symbols in an civilised manner, rather than with a NPE.
Test to show the bug with hyperlinking in macro arguments

Currently, the presentation compiler sees the expansion of macros;
this no longer contains the trees corresponding to the macro arguments,
and hyperlink requests result incorrect results.

https://www.assembla.com/spaces/scala-ide/tickets/1001449#
Use macro expandee, rather than expansion, in pres. compiler

The presentation compiler is primarily interested in trees that
represent the code that one sees in the IDE, not the expansion of
macros.

This commit continues to expand macros, but adds a hook in which
the presentation compiler discards the expansion, retaining instead
the expandee. The expandee is attributed with the type of the
expansion, which allows white box macros to work. In addition,
any domain specific errors and warnings issued by the macro will
still be reported, as a side-effect of the expansion.

The failing test from the last commit now correctly resolves
hyperlinks in macro arguments.

Related IDE ticket:

  https://www.assembla.com/spaces/scala-ide/tickets/1001449#

This facility is configured as follows:

    // expand macros as per normal
    -Ymacro-expand:normal

    // don't expand the macro, takes the place of -Ymacro-no-expand
    -Ymacro-expand:none

    // expand macros to compute type and emit warnings,
    // but retain expandee. Set automatically be the presentation
    // compiler
    -Ymacro-expand:discard

This leaves to door ajar for a new option:

    // Don't expand blackbox macros; expand whitebox
    // but retain expandee
    -Ymacro-expand:discard-whitebox-only

The existing test for SI-6812 has been duplicated. One copy exercises
the now-deprecated -Ymacro-no-expand, and the other uses the new
option.

.
SI-8064 Automatic position repair for macro expansion

  - Replace NoPosition with the focus of the macro application
  - Focus all range positions, for example, those of spliced arguments