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)
Modifies "maybeRewrap" to focus more on the maybe.

Existential types are rewrapped under a bunch of conditions
unless the operation performed on the underlying type returns
the same type by reference equality. That depends on a
foundation of predictability which doesn't exist. The upshot is
that existential types were rewrapped with abandon, even when
the type were identical.

This had both performance and correctness implications.
Note where the test case output changes like so:

  -scala.collection.immutable.List[Any]
  +scala.collection.immutable.List[<?>]

That's correctness.
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
align partest script with ant

don't silently pass -deprecation to scalac by default
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-6811 Remove scala.annotation.serializable

Every usage of it has been eliminated in earlier commits,
so the source file can finally be removed, too.
SI-6811 Remove usages of scala.annotation.cloneable

The source file itself will be removed later,
because the compiler seems to need it for boot-strapping.