SI-7120 Erasure must honor typeref prefixes

Erasure was discarding these, which led to unnecessarily
wide types in quite particular circumstances. This showed
up as a double definition error in the reported bug when the
bridge method clashed with the erased signature.
remove unused imports
Shadowed Implict typo (fixes no issue)
Fixed error in reflection API docs about linearization order on method baseClasses
SI-7015 Removes redundant aconst_null; pop; aconst_null creation

In an effort to adapt methods and field accesses of type Null to
other types, we were always emitting

    aconst_null
    pop
    aconst_null

The problem is we were doing that even when the JVM was in a position
to know it had null value, e.g. when the user had written a null
constant. This commit fixes that and includes a test to show that the
resulting byte code still works even without repeating ourselves and/or
repeating ourselves.

This commit also makes the scala.runtim.Null$ constructor private. It
was a sealed abstract class which prevented subclassing in Scala, but
it didn't prevent subclassing in Java. A private constructor takes care
of that hole so now the only value of type Null$ should be null.

Along the way I found some other questionable things in adapt and I've
added TODO's and issue https://issues.scala-lang.org/browse/SI-7159 to
track.
please ant with filenames, add comments
Merge pull request #2133 from som-snytt/typos-2.10.x

Shadowed Implict typo (fixes no issue)
Merge pull request #2143 from heathermiller/docs/linearization-typo

Fixed error in reflection API docs about linearization order on method baseClasses
SI-7015 Cleanup from review of null duplication

Based on feedback on https://github.com/scala/scala/pull/2147

* Assertion in GenICode#adaptNullRef reports the erroneous type
* Test makes the Null type explicit for greater clarity
Merge pull request #2120 from adriaanm/patmat-refactor

refactor the pattern matcher into smaller files
SI-7171 Consider prefix when assessing type finality.

`Type#isFinalType` determines if a type could have a
non-bottom subtype. This property is exploited by
the pattern matcher to flag impossible patterns.

This check was ignoring the type's prefix, and
incorrectly deemed that `T#A` in `trait T { final class A }`
was a final type. But it could have been subtyped by
`U#A` where `U` <:< `T`, or, more simply, by `T.this.A`.

Now, type finality requires that the prefix is stable.

The existing test cases in neg/patmat-type-check.scala
still correctly flag incompatiblities.

`isFinalType` is also used by some code that massages
pattern matches post specialization. That is actually
either broken or obsolete under virtpatmat, I've opened
SI-7172 to invesigate that.

It is also used by GenICode to determine whether to emit
the appropriate equality checks that are correct in the
face of boxing. It is possible that this change will force
the slow path in some rare cases, but it won't affect
correctness.
Merge pull request #2147 from JamesIry/master_SI-7015

SI-7015 Removes redundant aconst_null; pop; aconst_null creation
Merge pull request #2157 from retronym/ticket/7171

SI-7171 Consider prefix when assessing type finality.
Merge remote-tracking branch 'origin/2.10.x' into master

* origin/2.10.x:
  SI-7171 Consider prefix when assessing type finality.
  please ant with filenames, add comments
  Fixed error in reflection API docs about linearization order on method baseClasses
  Shadowed Implict typo (fixes no issue)
  remove unused imports

Conflicts:
	src/reflect/scala/reflect/internal/Types.scala
Merge pull request #2162 from paulp/merge-210

Merge 2.10.x into master.
Merge pull request #2125 from retronym/ticket/7120

SI-7120 Erasure must honor typeref prefixes
catching up
dead code, faster, debug version
dead code, faster, non-debug
documentation