Don't hop to the first enclosing, non-silent context when typing refinements.

Closes SI-5305.

This reverts a few lines of e5cfe47a19, which was a remedy for SI-3614 and SI-3856*. I added a test case for the former, the
latter was already tested. Both tests pass after this change, and they do so with the old and new pattern matcher.

But does this change still "avoid trees with null types in presentation compiler"? What was the intent of the context hopping in the first place?

* Based on this comment: https://issues.scala-lang.org/browse/SI-3614?focusedCommentId=50477&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50477, which elaborates further than the commit comment of e5cfe47a19.
Add more logging.
Fix SI-4928

better error message when a parameter is first defined positionally, then with a named argument.
Test case for SI-3844 - fixed by #virtpatmat @adriaanm
SIP-14: clean ups and fixes
A band-aid solution for SI-5803.

Since ae5ff662, resetAttrs duplicates trees, which doesn't preserve ApplyConstructor.
My attempt to modify TreeCopier to do so proved trickier than expected.

In any case, ApplyConstructor is not long for this world, and is only used in tree printing
to distinguish `new X` from regular Apply trees, so this should suffice pending full surgery.
Added infrastructure to enable easy enrichment of GenTraversables.
Merge pull request #562 from retronym/ticket/5803

A band-aid solution for SI-5803.
fixes resetAttrs
Merge pull request #563 from milessabin/feature/enrich-gentraversables

Added infrastructure to enable easy enrichment of GenTraversables.
Merge pull request #564 from scalamacros/topic/assertinresetattrs

fixes resetAttrs
Merge pull request #566 from lrytz/wip/t4928

Fix SI-4928
Fixes SI-5801, error messages regression. Review by @adriaanm
better feedback for SI-5044
Fixes SI-4717.

A lazy val declared inside an anonymous class inside a specialized
context no longer crashes Duplicators.

Previously, a duplicated lazy val was assigned to the wrong owner
in Duplicators:

    def x[B >: A]: Unit = new Bounds[B] {
      lazy val it = ???  // def or val okay
    }

Above, the `it` in `$anon` in `x$mcZ$sp` had its owner set to `x$mcZ$sp`
instead of `$anon`. This crashed the typer when it had to retype its
lazy accessor, because there was no `lazy var it` in `$anon$`.
Furthermore, the duplicated symbol wasn't being added to the list of
declarations of `$anon`.

Changes:
1) `invalidate` in Duplicators takes an additional parameter which is
the new owner of the new symbol that has to be duplicated. If this parameter
is set to `NoSymbol`, then the new owner is `context.owner`, as before.
2) the newly created lazy val symbol is being added to the list of
declarations of its new owner.

Removes debugging output from the previous commit.

Review by dragos.
@mention dragos
Fix SI-5544

Type-check annotations in a context with a localDummy owner
Merge pull request #567 from lrytz/wip/t3488

Test case for SI-3844 - fixed by #virtpatmat @adriaanm
Further fixes SI-4717.

Only adding a lazy val into list of declarations if the owner is a class.

Review by dragos.
@mention dragos
Fix 4138
Fixes previous commit.

Should be checking if the owner of the new symbol is a class, not the new symbol itself.