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.
Move resolver and resolveEither to impl.Promise
more defensive bridging to extractor: consider boolean
fix test so that new patmat is tested
Fix SI-5009: case-class copy method now eta-expands over higher parameter lists.

Example: Given

  case class C(a: Int)(b: Int)

if you call (new C(1)(2)).copy(a = 10)), you get a function (f: Int => C) such
that (f.apply(20)) yields a (new C(10)(20)).
Fix for unnecessary InnerClasses for top-level objects.

Mirror classes (with static forwarders) for top-level
objects would get unnecessary InnerClasses entries
in some cases. See the following comment I introduced
to the place I fixed:

We need to make sure that we do not confuse inner classes
of the class  we mirror with inner classes of the class
we are mirroring. These two sets can be different as
seen in this case:

```scala
 class A {
  class B
  def b: B = new B
 }
 object C extends A
```

Here mirror class of C has a static forwarder for
(inherited) method `b` therefore it refers to class `B`
and needs InnerClasses entry. However, the real class
for `C` (named `C$`) is empty and does not refer to `B`
thus does not need InnerClasses entry it.

NOTE: This logic has been refactored in GenASM and
everything is implemented in a much cleaner way by
having two separate buffers.
fixes a problem with an extractor object overloaded by a regular def
Fix SI-5626.

By not replacing 'CaseClass.apply()' factor by 'new CaseClass()' when the class type 'CaseClass' is not accessible.
Recognize java enums as constants from source.

Fixed up one of the mismatches between how java source is modeled
and how java bytecode is modeled.  We should get the rest of them
too.  Closes SI-2764.
Test case closes SI-5165.

Also fixed by annotation/enum commit.
Test case closes SI-4124.

This looks like a job for... virtpatmat!
Merge commit 'refs/pull/530/head'; commit 'refs/pull/531/head'; commit 'refs/pull/532/head'; commit 'refs/pull/533/head'; commit 'refs/pull/534/head' into develop
Test case closes SI-5407

It still breaks as described in the ticket under -Xoldpatmat.
cherry-picking important macro fixes from topic/reflection
Another bug bites virtpatmat's dust.

Test case closes SI-5029.
A REPL pattern matching crasher that crashes no more.

Not due to virtpatmat, mind you; it passes with -Xoldpatmat.

Closes SI-4025.
NSDNHAO need not tell us in which version it resides.

This is done for all crashers now. Furthermore, that error report
makes it pretty clear that it's a compiler bug, not user error, so
"this is a bug" seem like needless words.

Resisted the nostalgic temptation to remove the "an".
Confirm extractor based pattern matches don't explode exponentially.

Closes SI-1133, thanks virtpatmat.
Merge remote-tracking branches 'retronym/ticket/5407', 'scalamacros/topic/macrocherrypick', 'lrytz/t5626', 'lrytz/t5009', 'retronym/ticket/5029', 'retronym/ticket/4025', 'retronym/topic/quieter-nsdhnao' and 'retronym/ticket/1133' into develop
Clutch modification to tree printing.

Don't print trees under -Xprint:all if they're identical to the
tree printed at the previous phase.  It only works for a single
compilation unit but that is a huge step forward for us debuggers.
For instance this file:

  trait Foo { def f = 5 }

used to produce 332 lines of output and now produces 92, with
zero loss of information.  It ends with:

  [[syntax trees at end of                   cleanup]] // a.scala: tree is unchanged since mixin
  [[syntax trees at end of                     icode]] // a.scala: tree is unchanged since mixin
  [[syntax trees at end of                   inliner]] // a.scala: tree is unchanged since mixin
  [[syntax trees at end of   inlineExceptionHandlers]] // a.scala: tree is unchanged since mixin
  [[syntax trees at end of                  closelim]] // a.scala: tree is unchanged since mixin
  [[syntax trees at end of                       dce]] // a.scala: tree is unchanged since mixin
  [[syntax trees at end of                       jvm]] // a.scala: tree is unchanged since mixin