Fix SI-7224.

Don't focus positions assigned to the TypeTree of a parent of a Template
when the parent exists in the source. A focused position (instance
of `OffsetPosition`) makes it invisible to the presentation compiler
when it looks for the innermost enclosing tree of a given position
(breaking hyperlinking, for example).
Analyze constants to remove unnecessary branches

This commit adds analysis and optimization of constants to remove
unnecessary branches. It uses abstract interpretation to determine
what constant(s) a particular stack slot or variable might or might not
hold at a given spot and uses that knowledge to eliminate branches that
cannot be taken. Its primary goal is null check removal, but it also
works for other constants.

Several tests are modified to include the new optimization phase.

Two new tests are added. One verifies that branching still works as
expected. The other verifies that branches are removed.
Merge pull request #2212 from dragos/fix/SI-7224

Fix SI-7224.
SI-5710 has fixed itself

My job here is only to submit tests.
reifier is now aware of SI-7235

SI-7235 is caused by a long-standing todo in typedRefinement, which leads
to originals of compound type trees swallowing their stats.

I'm not sure how exactly to fix SI-7235, but what I am sure about is that
we shouldn't silently discard stats during reification. This patch
introduces a new implementation restrictions, which now reports that
reify of compound type trees with non-empty stats isn't going to work.
SI-7234 Make named args play nice with dep. method types

Some care is needed to avoid interaction with constant
types (e.g pos/z1730.scala) and with existentials
(e.g. t3507-old.scala).
SI-7226 Fix inference regression caused by TypeVar equality.

TypeVars, being mutable creatures, mustn't have structural
equality/hashing, otherwise TypeRefs that differ only by
having distinct TypeVars as components get wrongly uniqued
together.

The reported bug showed the disaterous consequences: constraints
from the `C?[Int]` in the return type applied to the `?C[?A]` in
the parameter list.

This commit overrides `equals` and `hashCode` in `TypeVar`
to use reference equality. An alternative fix would be to drop
the `case`-ness of the class, as was the case before 0cde930b
when this regressed.
SI-7328 Bail out of names/defaults if args are error typed

To avoid a crasher later on with a null type inside a
sequence argument.
SI-7228, bug in weak subtyping.

Another in the category of bugs which involve narrowing,
widening, mediuming, dealiasing, weakening, normalizing,
denormalizing, supernormalizing, subnormalizing, and
double-bounded supersubnormalizing.

This is probably not the ideal fix, but it is an improvement.
Simplified the widening logic.

Should speak for itself.

Whenever someone changed @switch from an error to a warning,
it broke all the tests which depended on the error. I added
-Xfatal-warnings to a couple which needed it. And one of those
tests was then failing, as it must now since we couldn't get away
with what was being attempted, so I moved it to pending.
Moved some numeric subtyping logic closer to center.

Fixed bug in numeric widening related to continuations,
which enabled simplifying isNumericSubType.
SI-6601 Close access loophole for value class constructors

ExtensionMethods marks private constructors of value classes as
notPRIVATE before pickling. When the pickler reads the flags of this
symbol, the anti-shift mechanism folds this into the regular PRIVATE
flag, so the class is pickled as though it was public all along. A
seprately compiled client can then call this constructor.

To remedy this, we must:

 - pickle `rawFlags`, rather than `flags`. This is symmetric with
   unpickling, which sets `rawFlags` with the value it reads.
 - Add `notPRIVATE` to the flagset `PickledFlags`.

We cannot make this change in a minor version, as the pickler
and unpickler must agree on `PickledFlags`.

I believe that this won't change the size of pickled flags
for the majority of symbols (ie, those without the notPRIVATE flag)
due to the variable length encoding in `writeLongNat`.

This also improves the situation for SI-6608. Reflection and
scalap (and, by extension, IntelliJ), no longer will see
as public methods that have had their access widened in
SuperAccessors (which is done selectively to support inlining
under separate compilation.)
Merge pull request #2228 from retronym/ticket/7226

SI-7226 Fix inference regression caused by TypeVar equality
Merge pull request #2223 from scalamacros/ticket/7235

reifier is now aware of SI-7235
Merge pull request #2221 from scalamacros/ticket/5710

SI-5710 has fixed itself
Merge pull request #2225 from retronym/ticket/7234

SI-7234 Make named args play nice with dep. method types
Merge pull request #2224 from retronym/ticket/7238

SI-7328 Bail out of names/defaults when args are error typed
Merge 2.10.x into master

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
Merge 2.10.x into master

Conflicts:
	src/compiler/scala/reflect/reify/Errors.scala
	src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
Merge pull request #2236 from retronym/ticket/6601-2

SI-6601 Close access loophole for value class constructors