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]
AbstractFile.getDirectory does not return null when outDir is "."
SI-6771 Alias awareness for checkableType in match analysis.

Failure to dealias the type of the scrutinee led the pattern
matcher to incorrectly reason about the type test in:

   type Id[X] = X; (null: Id[Option[Int]]) match { case Some(_) => }

Before, `checkableType` returned `Id[?]`, now it returns `Some[?]`.
Refactor DirectTest so java can be tested.

There was no way to make a java compilation unit.
Now there is.
SI-7398 Add support for java8 default methods

In classfile parser: mark symbols which represent interface
methods yet have code attributes with new flag DEFAULTMETHOD.
These must be kept distinct from regular method bodies so that
an error can be issued when a regular concrete method is
overridden without the override keyword, but not when the
overridden method is a default.

In java source parser: mark Modifiers of interface default
methods with DEFAULTMETHOD flag.

Writing the test was everything I dreamed, and more! However,

  % test/partest --debug test/files/run/t7398.scala
  Skipping java8-specific test under java version 1.7.0_21
  testing: [...]/files/run/t7398.scala                                  [  OK  ]
  All of 1 tests were successful (elapsed time: 00:00:04)

  % test/partest --debug test/files/run/t7398.scala
  Attempting java8-specific test under java version 1.8.0-ea
  testing: [...]/files/run/t7398.scala                                  [  OK  ]
  All of 1 tests were successful (elapsed time: 00:00:13)
SI-7426 Crash in pickler.

I wonder if the supply of copy-pasted code, and the bugs
which always accompany it, will ever run low. Here we have
a couple hundred lines of tree traversal which appears
roughly identical in structure to a different couple hundred
lines of tree traversal, except one calls methods called
putXXX and the other calls methods called writeXXX.

Except there was one call to writeXXX among all the putXXX
calls. Guess where it was crashing.

This entire file should be expunged.
SI-7271 fixes positions of string interpolation parts

Positions of static parts are now set explicitly during parsing rather
than filled in wholesale during subsequent atPos after parsing.

I also had to change the offsets that scanner uses for initial static
parts of string interpolations so that they no longer point to the
opening double quote, but rather to the actual beginning of the part.
SI-6863 root cause fixed using factory of scala.runtime.*Ref

This commit does away with an error-prone division of labor between
UnCurry and LambdaLift, a division of labor by which UnCurry had to
anticipate under which circumstances LambdaLift creates a
scala.runtime.*Ref whose initial value is given by a an expression
including a Try in non-statement position. That sounds complicated,
and it is.

The solution so far (fixing SI-6863) is replaced by a simpler approach,
at the cost of forward binary comptability with pre-2.11 releases,
this time fixing the root cause of SI-6863.

From now on, a s.r.*Ref is instantiated via invocation of
a static factory method in the s.r.*Ref class in question.
Unlike the code that was emitted so far (which involved
NEW refclass, DUP, expr, INVOKESPECIAL refclass.<init>)
the "expr" doesn't appear on the operand stack on top
of the *Ref value being initialized. In other words,
the *Ref initialization is in statement position provided "expr" is.
indentation typo
SI-7432 Range.min should throw NoSuchElementException on empty range

For consistency, range.max and range.min should throw
NoSuchElementException on an empty range.
SI-5634 eliminate overly verbose error message

In fact I couldn't see where the error message described in
the ticket is being produced, and I'm supposing it has
already vacated the premises. I went through ClassfileParser
and UnPickler, the two enclaves most likely to harbor the
spewer, and hardened the output. No printlns, tighter
assertion messages, and string interpolation for aesthetics.
We're not savages.
SI-7385 crash in erroneous code

Less crashing, more emitting errors.
SI-7432 add testcases
SI-6091 overeager warning for reference equality

Don't warn on eq and ne unless they're the real eq or ne.
SI-7441 Don't ramble on about inapplicable implicits.
Partest can --show-diff again after incremental report.

A flag is set in NestUI to look for "diff" in the transcript
of failing tests.
Merge pull request #2440 from retronym/ticket/6771

SI-6771 Alias awareness for checkableType in match analysis.
SI-5734 Allow setting of socket timeout for remote actors

TcpService is locked while connections are being established, preventing
messages being sent to remote nodes. There was no way to specify a connect
timeout, so the service was waiting for a ConnectException to be thrown if
the remote node was unavailable (which can take several minutes).

Added a system property to allow setting a socket connect timeout to
prevent the TcpService from being locked for minutes at a time.

Default behaviour is unchanged, all tests pass and the patch has been
running in production without issue.
Absolutized paths involving the scala package.

Confusing, now-it-happens now-it-doesn't mysteries lurk
in the darkness. When scala packages are declared like this:

  package scala.collection.mutable

Then paths relative to scala can easily be broken via the unlucky
presence of an empty (or nonempty) directory. Example:

  // a.scala
  package scala.foo
  class Bar { new util.Random }

  % scalac ./a.scala
  % mkdir util
  % scalac ./a.scala
  ./a.scala:4: error: type Random is not a member of package util
    new util.Random
             ^
  one error found

There are two ways to play defense against this:

 - don't use relative paths; okay sometimes, less so others
 - don't "opt out" of the scala package

This commit mostly pursues the latter, with occasional doses
of the former.

I created a scratch directory containing these empty directories:

  actors annotation ant api asm beans cmd collection compat
  concurrent control convert docutil dtd duration event factory
  forkjoin generic hashing immutable impl include internal io
  logging macros man1 matching math meta model mutable nsc parallel
  parsing partest persistent process pull ref reflect reify remote
  runtime scalap scheduler script swing sys text threadpool tools
  transform unchecked util xml

I stopped when I could compile the main src directories
even with all those empties on my classpath.
Hardening against nulls for deserialization.

When one attempts to populate data structures via
deserialization, nulls tend to show up in unlikely or
"impossible" places. Now there are a few fewer.