SI-6923 Context now buffers warnings as well as errors

Code that was silently typed would not report warnings, even if it
returned a successful result.

This appeared in the following code which didn't show warnings even
with -Ywarn-adapted-args:

    def foo(a: Any) = a; foo(1, 2)

While the following would show the expected warning:

    def foo[A](a: Any) = a; foo(1, 2)
SI-5568 Fixes verify error from getClass on refinement of value type

().asInstanceOf[AnyRef with Unit].getClass and
5.asInstanceOf[AnyRef with Int].getClass would cause a verify
error. Going the other way, i.e. [Unit with AnyRef] or [Int with AnyRef]
worked fine. This commit fixes it that both directions work out to
BoxedUnit or java.lang.Integer.
SI-5568 Comment improvements for getClass on primitive intersection.

Based on code review here are a few comment cleanups and the removal of
some dead test code.
SI-6956 determine switchability by type, not tree

Constant folding will set the type of a constant tree
to `ConstantType(Constant(folded))`, while the tree
itself can be many different things (in casu, an Ident).

We used to look at the tree directly when deciding whether
to emit a switch. Now we look at the tree's type. Voilà.
use Constant::isIntRange even if it's NIH
Closes SI-6952: add correct error positions for Dynamic feature check.
SI-6017 Scaladoc's Index should be case-sensitive
SI-6443 Widen dependent param types in uncurry

Bridge building operates on unusual method signatures:
after uncurry, so parameter lists are collapsed; but before
erasure, so dependently typed parameters are still around.

Original:

  def foo(a: T)(b: a.type, c: a.U): Unit

During computeBridges:

  (a: T, b: a.type, c: a.U)Unit

This signature no longer appears to override the corresponding
one in a superclass, because the types of `b` and `c` are dependent
on method parameters.

The root of the problem is uncurry, which leaves the trees in
a poor state. This commit changes uncurry to remedy this.

An example illustrates it best:

    // source
    def foo(a: A)(b: a.type): b.type = b

    // post uncurry before this patch.
    // not well typed code!
    def foo(a: A, b: a.type): a.type = {

    // post uncurry after this patch
    def foo(a: A, b: A): A = {
       val b$1 = b.asInstanceOf[a.type]
       b$1
    }
SI-6443 Expand test coverage with varargs, by-name.

These were already working, due to a serendipitous
ordering of transformations. The tests will keep
it this way.
SI-6976 Fix value class separate compilation crasher.

We can't guarantee that the owner of the value class
is initialized, and if it isn't, the search for the
companion module will turn up bubkis.

This is a localized fix, but I'd be suprised if there
weren't other places that suffered from the same problem.

Wouldn't it be nicer to have something like:

    // doesn't force info
    sym.raw.info
    sym.raw.companionModule

    // forces info
    sym.info
    sym.companionModule
Forgot to cherry-pick the .check file
There is no "letters" method in this branch
SI-6601 Publicise derived value contstructor after pickler

Otherwise the access restrictions are not enforced under
separate compilation.

See also SI-6608.
Merge pull request #1905 from adriaanm/ticket-6956

SI-6956 determine switchability by type, not tree
Merge pull request #1854 from pufuwozu/ticket-SI-6923

SI-6923 Context now buffers warnings as well as errors
Merge pull request #1914 from retronym/ticket/6601

SI-6601 Publicise derived value contstructor after pickler
SI-6942 more efficient unreachability analysis

Avoid blowing the stack/the analysis budget by more eagerly translating
the propositions that model matches to CNF.
First building a large proposition that represents the match,
and then converting to CNF tends to blow the stack.
Luckily, it's easy to convert to CNF as we go.

The optimization relies on `CNF(P1 /\ ... /\ PN) == CNF(P1) ++ CNF(...) ++ CNF(PN)`:

Normalizing a conjunction of propositions
    yields the same formula as
concatenating the normalized conjuncts.

CNF conversion is expensive for large propositions,
so we push it down into the conjunction and
then concatenate the resulting arrays of clauses (which is cheap).

(CNF converts a free-form proposition into an `Array[Set[Lit]]`, where:
 - the Array's elements are /\'ed together;
 - and the Set's elements are \/'ed;
 - a Lit is a possibly negated variable.)

NOTE:
 - removeVarEq may throw an AnalysisBudget.Exception
 - also reworked the interface used to build formula,
   so that we can more easily plug in SAT4J when the time comes
use ArrayBuffer instead of Array to build Formulae
Merge pull request #1904 from JamesIry/SI-5568_2.10.x

SI-5568 Fixes verify error from getClass on refinement of value type
SI-6902 Check unreachability under @unchecked

Only exhaustiveness checking should be disabled if the
scrutinee of a match as annotated as `: @unchecked`.
This was the pre-2.10.x behaviour.

This also fixes a variation of the closed ticket,
SI-6011. The exhaustiveness check is needed to
safely fallback from emitting a table switch if
duplicate cases are detected.