Carve up Types.scala

Step one of a plan to bring some order and thread
safety to this neck of the woods.

More info:

  https://gist.github.com/retronym/5081754
  https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/MOvmcnbyb_g

Note that the sub package is named 'tpe' and not 'Types' to avoid
potential problems on case insensitive file systems, given the existing
trait 'Types.'
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.
SI-6725 `f` interpolator now supports %n tokens

Currently the `f` interpolator supports format specifiers which
specify conversions for formatted arguments. However Java formatting
is not limited to argument-related conversions as explained in:
http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html#detail.

Conversions which don't correspond to any arguments are `%` (used to
emit verbatim `'%'` characters) and `n` (used to emit platform-specific
line separators). Of those only the former is supported, and this patch
fixes the oversight.
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).
Bring some sanity to the stability test.

There is no reason to be stability testing every piece of
bytecode we've ever encountered. If the compilation products
are unstable, then testing 20,000 classfiles will reveal it.
Or it won't; either way, we can stop there. So I cut a gordian
knot and focused the stability test solely on the contents of:

  library reflect compiler

Next I cut the "custom ant task" cord. There's a tool for
diffing files, it's decades old, it's called diff. It does
the entire job we need. If it doesn't work on windows, it
doesn't matter. The stability test is not something which
needs to run in every environment. Either the classfiles
are stable or they aren't.

Generated the ant xml for building quick.{lib,reflect,comp}
and strap.{lib,reflect,comp} so they are identical modulo the
compiler used to build them, probably for the first time ever.
I'm sure they won't stay that way, but it's a step.
Enabling commit for interactive/scaladoc modules.

This is a non-behaviorally-changing setup commit which
re-routes bits of code through avenues which can more easily
be influenced by subclasses of Global.
Moved scaladoc sources into separate directory.

This change is not externally visible. It moves the scaladoc
sources into src/scaladoc and adds an ant target for building
them. The compilation products are still packaged into
scala-compiler.jar as before, but with a small change to
build.xml a separate jar can be created instead.
Moved interactive sources into separate directory.

As with the preceding commit, this has build-internal
effects only.
Teach partest the magic of abstraction.

Some new partest abilities which were necessary to deal with
additional standard jars. These new abilities aren't yet put
to the test because scaladoc and interactive are still going
into the compiler jar.

No longer need each jar or classes directory be named
directly for partest to find them.
Give partest its own classpath in build.xml.

Separate from (and larger than) pack.classpath. Then take
the opportunity to lower the comic/tragic level of duplication
in build.xml.
Give interactive tests their own target.

% ant test.interactive
Moved scaladoc code into src/scaladoc.

This leverages the preceding several commits to push scaladoc
specific code into src/scaladoc. It also renders some scanner
code more comprehensible.
Moved interactive code into src/interactive.

As with scaladoc, pushes presentation compiler specific
code into its separate source area.
Eliminated all forInteractive/forScaladoc uses.

This is the commit which brings it all together. The booleans
forInteractive and forScaladoc are now deprecated and are not
inspected for any purpose. All behavioral changes formerly
accomplished via tests of those flags are embodied in the globals
built specifically for those tasks.
Deprecated custom ant task 'Same'.
SI-7132 - don't discard Unit type in interpreter