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.
 Fix SI-6932 by enabling linearization of callback execution for the internal execution context of Future
SI-6932 Remove Batchable trait plus minor clean-ups
SI-6863 Fix verify error in captured var inited from expr with try/catch

If a captured var was inited from a try/catch we did something
reasonable. But if the var was inited from a more complicated expression
(if/else, a block, match/case, etc) that ended with
a try/catch then we didn't and we were generating faulty byte code.
This fix patches LambdaLift to add the missing cases.

For known simple expressions, the translation is just new *Ref(expr).

For try/catch, if/else, match/case, and blocks this recursively
walks down the internal result expressions to translate them. E.g.
if(cond) trueExpr else falseExpr becomes if(cone) translate(trueExpr)
else translate(falseExpr)

For unknown expression types, the translation is {val temp = expr; new
  *Ref(expr) }
SI-4602 Make fsc absolutize source file names

The fsc server was using a path supplied by the client to turn things
like class path values into absolute paths. But it wasn't absolutizing
the source file names supplied to the compiler which lead to SI-4602.
This commit adds that absolutizing bit and cleans the logic up a bit
so that the settings object isn't told a path that it already knows.

A test is included that simulates changing directory by forcing two
different -current-dir settings on two different compile sessions on
the same server process.
Make value classes TreeCheckers friendly

 - allow for re-typechecking by disabling "redefinition of
   equals" errors for synthetic methods.
Ill-scoped reference checking in TreeCheckers

Find trees which have an info referring to an out-of-scope
type parameter or local symbol, as could happen in the test
for SI-6981, in which tree transplanting did not substitute
symbols in symbol infos.

The enclosed, pending test for that bug that will now
fail under -Ycheck:extmethods -Xfatal-warnings.

    [Now checking: extmethods]
    [check: extmethods] The symbol, tpe or info of tree `(@scala.annotation.tailrec def loop(x: A): Unit = loop(x)) : (x: A)Unit` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: method loop, method bippy$extension, object Foo, object O, package <empty>, package <root>
    [check: extmethods] The symbol, tpe or info of tree `(val x: A = _) : A` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: value x, method loop, method bippy$extension, object Foo, object O, package <empty>, package <root>
    [check: extmethods] The symbol, tpe or info of tree `(loop(x)) : (x: A)Unit` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: method loop, method bippy$extension, object Foo, object O, package <empty>, package <root>
    [check: extmethods] The symbol, tpe or info of tree `(loop) : (x: A)Unit` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: method loop, method bippy$extension, object Foo, object O, package <empty>, package <root>
    [check: extmethods] The symbol, tpe or info of tree `(x) : A` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: value x, method loop, method bippy$extension, object Foo, object O, package <empty>, package <root>
    [check: extmethods] The symbol, tpe or info of tree `(<synthetic> val x2: O.Foo[A] = (x1.asInstanceOf[O.Foo[A]]: O.Foo[A])) : O.Foo[A]` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: value x2, method equals$extension, object Foo, object O, package <empty>, package <root>
    [check: extmethods] The symbol, tpe or info of tree `(<synthetic> val Foo$1: O.Foo[A] = x$1.asInstanceOf[O.Foo[A]]) : O.Foo[A]` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: value Foo$1, method equals$extension, object Foo, object O, package <empty>, package <root>
    [check: extmethods] The symbol, tpe or info of tree `(Foo$1) : O.Foo[A]` refers to a out-of-scope symbol, type A in class Foo. tree.symbol.ownerChain: value Foo$1, method equals$extension, object Foo, object O, package <empty>, package <root>
    error: TreeCheckers detected non-compliant trees in t6891.scala
    one error found
SI-6891 Fix value class + tailrec crasher.

rhs.substituteSymbols(old, new) leaves us with:

    def loop#12225(x#12226: A#15491): scala#21.this.Unit#1615 =
      loop#12225(x#12226)

In which the TermSymbol x#12226 has a stale info, pointing at
the A#7274, the class type parameter, rather than A#15491,
the corresponding type parameter of the synthetic backing
method.

I've improved `TreeSymSubstituter` to substitute not
only `Tree#{tpe, symbol}`, but also `DefTree#sym.info`.

The `pos` test that triggered the new code path are
listed here: https://gist.github.com/4575687

AFAICS, no special treatment of Function, Return, or Import
is needed in TreeSymSubstutor.
Bumped partest MaxPermSize to 128m.
Merge pull request #1983 from paulp/pr/partest-permgen

Bumped partest MaxPermSize to 128m.
SI-4733 - fsc no longer creates a single temp directory for all users.

fsc previously created a single temporary directory called
"scala-devel". This is an issue, since the directory belongs to whoever
created the directory. Depending on the user's umask, this directory may
only be writable for the creator. This causes problems for any other
users who then try to use fsc or invoke fsc indirectly.

Other programs usually solve this issue by creating a separate directory
for each user, either by appending the username to a base directory name
or creating a new direcotory with a random name with a program like
"mktemp". This commit changes CompileSocket to use the first method.

Fixes SI-4733
backport to 2.10.x
SI-6939 Fix namespace binding (xmlns) not overriding outer binding

Given a nested XML literal to the compiler Elem instance is generated with
namespace binding of the inner element copying that of the outer element:

    val foo = <x:foo xmlns:x="http://foo.com/">
      <x:bar xmlns:x="http://bar.com/"><x:baz/></x:bar></x:foo>

With the above example, `foo.child.head.scope.toString` returns

    " xmlns:x="http://bar.com/" xmlns:x="http://foo.com/""

This is incorrect since the outer xmls:x should be overridden by the inner binding.

XML library also parses XML document in a similar manner:

    val foo2 = scala.xml.XML.loadString("""<x:foo xmlns:x="http://foo.com/"><x:bar xmlns:x="http://bar.com/"><x:baz/></x:bar></x:foo>""")

Despite this erroneous behavior, since the structure of NamespaceBinding class
is designed to be singly-linked list, the stacking of namespace bindings allows
constant-time creation with simple implementation.
Since the inner namespace binding comes before the outer one, query methods like `getURI` method behave correctly.

Because this bug is manifested when Elem is turned back into XML string, it could be fixed by shadowing the redefined namespace binding right when
buildString is called. With this change `foo.child.head.scope.toString` now returns:

    " xmlns:x="http://bar.com/""
SI-7018 Fix memory leak in Attachments.

Makes NonEmptyAttachments a top level class so that
it doesn't accidentally accumulate history via the
$outer field.

No test is included because I think the fix is
self evident.
Update a checkfile from a recent fix.

The build is currently broken:

  https://scala-webapps.epfl.ch/jenkins/view/2.10.x/job/scala-nightly-main-2.10.x/
Merge pull request #1977 from retronym/ticket/7018

SI-7018 Fix memory leak in Attachments
SI-4602 Disable unreliable test of fsc path absolutization

The included test for fsc path absolutization almost certainly has
the same reliability problem as a similar test that was disabled in
https://github.com/scala/scala/pull/1985 . Disabling the test until
I can figure out a reliable way to test fsc in an our continuous
integration environment.
Merge pull request #1857 from retronym/ticket/6443-2.10.x

SI-6443 Widen dependent param types in uncurry
Merge pull request #1941 from phaller/issue/6932-futures-internal-callbacks

SI-6932 StackOverflowError in chained Future.flatMap calls
Merge pull request #1927 from JamesIry/SI-6863_2.10.x

SI-6863 Fix verify error in captured var inited from block w try/catch