brings JavaMirrors up to speed with ClassfileParser

Apparently there are still discrepancies between how the vanilla compiler
turns class files into symbols and how the reflective compiler does it.

Working on bringing these guys in sync, one bug at a time.
SI-4907 SI-4615 scala.bat honors -J and -D options.

This makes scala.bat parse and use -J and -D arguments.

Specifically:
 - Parameters starting with -J are stripped of the prefix, unquoted if
   necessary and appended to %JAVA_OPTS% or default values.
 - Parameters starting with -D are unquoted if necessary and then
   appended to the others. The right-hand side of a property can be
   quoted or not.
 - All of those are given to `java` before any other parameters.
 - The above only happens on parameter preceding the first parameter
   that does not start with "-" (usually a class name).
 - The exact arguments passed to scala.bat are also given as-is to
   the scala launcher (including -J and -D arguments).

   set JAVA_OPTS=-Xmx512m
   scala -J-Xmx128m -Dprop1=42 -Dprop2="hello world" "-Dprop3=bar"
"-J-Xms64m" Test foo

   will result in

   java -Xmx512m -Xmx128m -Dprop1=42 -Dprop2="hello world" -Dprop3=bar
-Xms64m [cp, scala main] -J-Xmx128m -Dprop1=42 -Dprop2="hello world"
"-Dprop3=bar" "-J-Xms64m" Test foo
Merge pull request #2761 from scalamacros/ticket/7510

Assorted toolbox fixes
Merge pull request #2767 from gourlaysama/t4907

SI-4907 SI-4615 scala.bat now honors -J and -D options.
SI-7331 tb.parse returns unpositioned trees

This commit gets rid off code wrapping that was previously used by
toolbox to get into correct parsing mode. Instead combination of
templateStats/accept(EOF) is used. This is the same solution as the one
used in repl and built-in scriptRunner

This pull request doesn't attempt to generalize this approach in any
way and re-use it all over the place due to the caution of possible
accidental compatibility breakage. I plan to do it separately against
master.

Additionally there are a few more changes that make importers be aware
of positions and a test for that (via @jedesah).
Merge pull request #2800 from densh/topic/toolbox-positions

SI-7331 tb.parse returns unpositioned trees
showRaw now prints symbols of def trees

A very useful addition that came in handy when hacking macro annotations
[nomaster] macro errors now always have positions

Back then when I implemented macros for inclusion in trunk (Spring 2012),
partest didn't support the _1, _2, ... convention for neg tests, so I had
to use toolboxes to test macro-generated exceptions.

Unfortunately toolboxes aren't very good with positions (mostly because
their inputs are almost always constructed without corresponding sources)
so I didn't notice that errors signalizing about macro-generated
exceptions actually don't carry positions with them because of a typo.

This patch fixes the oversight, but it doesn't need to be ported to master,
because over there everything's already fixed by one of the backports
from macro paradise.
currentRun.compiles now correctly works in toolboxes

Another random bug uncovered and extinguished when hacking macro annots.
Merge pull request #2818 from xeno-by/topic/macro-expansion-error-pos

[nomaster] macro errors now always have positions
Merge pull request #2817 from xeno-by/topic/toolbox-current-run-compiles

currentRun.compiles now correctly works in toolboxes
Merge pull request #2813 from xeno-by/topic/showraw

showRaw now prints symbols of def trees
[nomaster] SI-7733 reflective packages now more consistent with scalac

Previously PackageScopes from scala.reflect ignored all classes that
had $'s in non-rightmost positions in their names.

Unfortunately this behaviour is inconsistent with how scalac does things,
and I reconciled this as usual, by pulling corresponding logic into
scala-reflect.jar and sharing it between runtime reflection and compiler.

This change has seprate pull requests for 2.10.x and 2.11.0. The latter
deprecates `scala.tools.nsc.util.ClassPath.isTraitImplementation`
whereas the former (which you're looking at right now) does not, because
we can't deprecated members in minor releases.
SI-7020 Determinism for pattern matcher warnings

Use LinkedHashSet for the DPLL algorithm for determistic
counter example generation.

Before, the test compiled with:

    [info] v2.10.2 => /Users/jason/usr/scala-v2.10.2-0-g60d462e
    test/files/neg/t7020.scala:3: warning: match may not be exhaustive.
    It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List(_, _)
      List(5) match {
          ^
    test/files/neg/t7020.scala:10: warning: match may not be exhaustive.
    It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List(_, _)
      List(5) match {
          ^
    test/files/neg/t7020.scala:17: warning: match may not be exhaustive.
    It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _)
      List(5) match {
          ^
    test/files/neg/t7020.scala:24: warning: match may not be exhaustive.
    It would fail on the following input: List(_, _)
      List(5) match {
          ^
Merge pull request #2809 from xeno-by/ticket/7733

SI-7733 reflective packages now more consistent with scalac
SI-7694 @uncheckedBounds, an opt-out from type bounds checking

Synthetic defs introduced by transforms like named/default arguments,
ANF (in scala-async) often introduce a type tree (the tpt of the temporary)
that are based on the types of expressions. These types are scrutinized in
RefChecks to check that type parameter bounds are satisfied.

However, the type of the expression might be based on slack a LUB that
fails to capture constraints between type parameters.

This slackness is noted in `mergePrefixAndArgs`:

    // Martin: I removed this, because incomplete. Not sure there is a
    // good way to fix it. For the moment we just err on the conservative
    // side, i.e. with a bound that is too high.

The synthesizer can now opt out of bounds by annotating the type as follows:

   val temp: (<expr.tpe> @uncheckedBounds) = expr

This facility is now used in named/default arguments for the temporaries
used for the reciever and arguments.

The annotation is hidden under scala.reflect.internal, rather than in
the more prominent scala.annotation.unchecked, to reflect the intention
that it should only be used in tree transformers.

The library component of this change and test case will be included in the
next commit. Why split like this? It shows that the 2.10.3 compiler will
work with 2.10.2 scala-reflect.jar.
SI-7694 Add @uncheckedBounds to the library

Followup to the previous commit that added the compiler support
for opting out of bounds checking.

With both pieces, we can test that the temporaries introduced
by the named/default arguments transform don't trigger bounds
violations.
Merge pull request #2826 from retronym/ticket/7020-2.10.x

SI-7020 Determinism for pattern matcher warnings
Merge pull request #2828 from adriaanm/rebase-2771

[Rebase #2771] SI-7694 @uncheckedBounds, an opt-out from type bounds checking
SI-7014 Annot arg may refer to annotated class's member

This only reduces the crasher to a warning.