Add :kind command to REPL

:kind command diplays the kind of types and type constructors in Scala
syntax notation.

    scala> :kind (Int, Int) => Int
    scala.Function2's kind is F[-A1,-A2,+A3]
Corralling Modes into a smaller pen.

Attempting to reduce the frequency of low-level operations
with modes. I mean stuff like this:

  if ((mode & (EXPRmode | LHSmode)) == EXPRmode)

THey don't make those ten line boolean guards any easier
to understand. Hopefully this will lead us toward eliminating
some of the modes entirely, or at least better isolating
their logic rather than having it interspersed at arbitrary
points throughout the typer.

Modes are in their entirety a leaked implementation detail.
Typing a tree requires a tree and optionally an expected type.
It shouldn't require a bucket of state bits. In subsequent
commits I will start eliminating them.

This commit also breaks adapt down into more digestible chunks.
Started eliminating modes.

Consolidating the scattered typer state in Context, where it's
relatively easy to keep an eye on, rather than threaded throughout
the typer in sneaky/sticky bitmasks. The general pattern will be
what was once an explicitly passed around bit in Mode becomes
an implicitly propagated-as-appropriate bit in Context.

In this commit:

          ALTmode becomes context mode "PatternAlternative"
         STARmode becomes context mode "StarPatterns"
  SUPERCONSTRmode becomes context mode "SuperInit"
Eliminated SNDTRYmode.

It becomes context mode "SecondTry".
Eliminated RETmode.

It becomes context mode "ReturnExpr".
Eliminated HKmode.

It becomes context mode "TypeConstructor".
Refactored stabilize.

Mode elimination ramps up in difficulty now, so I pursued
other forms of code hygiene.
Incorporated reviewer feedback.

Made things a little more consistent and self-apparent.
SI-1786 incorporate defined bounds in inference

Also fixes SI-5459.

Look, you don't have to redeclare the bounds, isn't it exciting?
For instance, there are eight places in JavaMirrors with this:

  jTypeVariable[_ <: GenericDeclaration]

After this code is in starr, those can look like this:

  jTypeVariable[_]

Since TypeVariable's definition looks like this:

  interface TypeVariable<D extends GenericDeclaration>

We already know that!
No bounds-driven inference for the named.

This is a variation on the previous commit which excludes
named type parameters, so this works

  def f(x: Class[_]) = x.foo.bar

But this does not:

  def f[T](x: Class[T]) = x.foo.bar

This seems undesirable to me, but I offer it in case it makes
the patch more attractive to others.
ScriptEngine.eval() forwards Error instead of new ScriptException
Read-eval-print : the script engine does not need print so make it lazy

This can have a dramatic effect on computing time in cases with big
intermediate results but simple final one.
Deprecate parameter names in scala.concurrent

for the purpose of being consistent.
Also switches to Future.successful iso
Promise.successful(..).future for brevity
in implementation code.
Merge branch 'master' into HEAD

* master:
  SI-7469 Remove @deprecated scala.util.logging
  SI-3943 Test case for already-fixed Java interop bug
  Fix formatting for couple of docs in the compiler
  SI-7476 Add documentation to GenericTraversableTemplate
  SI-7469 Remove @deprecated scala.util.parsing.ast
  SI-7469 Remove @deprecated MurmurHash elements
  SI-7469 Remove deprecated elements in s.u.parsing.combinator
  SI-7469 Make @deprecated elems in scala.concurrent private[scala]
  removes duplication in inferImplicitValue
  SI-7047 fixes silent for c.inferImplicitXXX
  SI-7167 implicit macros decide what is divergence
  macroExpandAll is now triggered in all invocations of typed
  SI-5923 instantiates targs in deferred macro applications
  SI-6406 Restore deprecated API
  SI-6039 Harden against irrelevant filesystem details
  Limit unnecessary calls to Type#toString.
  fix typo in comment
  SI-7432 add testcases
  SI-7432 Range.min should throw NoSuchElementException on empty range
  AbstractFile.getDirectory does not return null when outDir is "."

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
Incorporated reviewer feedback.

Made things a little more consistent and self-apparent.
SI-7484 Add @SupressWarning(rawtypes/unchecked)
SI-7484 Indentation and whitespace fixes
Merge pull request #2340 from folone/topic/kind-pr

Added a :kind command to the REPL
Merge v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-master

    ================================================================

    Merge commit 'v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-master

    Conflicts:
        src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
        src/reflect/scala/reflect/runtime/JavaMirrors.scala

    ================================================================

    Merge -s ours 4e64a27 ([nomaster commit range])

    ================================================================

    Merge commit '0ae7e55' into merge/v2.10.1-326-g4f8c306-to-master

    Conflicts:
        src/compiler/scala/tools/nsc/typechecker/Macros.scala
SI-7492 Remove -Ystruct-dispatch and associated code

This means that the private option is gone as well as the untested
code for no-cache and mono-cache and the non-working code for
invoke-dynamic.

poly-cache is now always used. For the future it probably makes more
sense to let the backend decide how it wants to treat structural
dispatch instead of allowing the user to “mix and match” backends
with structural dispatch implementations.