Fix for exponential compile time in specialization.

Backport fix to 2.9.2, from commit 39f01d4f48e59c2037a3af759eb6d55d0da50e70
on paulp/scala.
Review by @prokopec.

Conflicts:
	src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
Merge pull request #806 from Blaisorblade/topic/backport-exponential-specialization-fix

[Backport] Fix for exponential compile time in specialization.
worksheet support on 2.9
Merge pull request #1153 from lrytz/worksheet-29

worksheet support on 2.9
Initial cut at running binary compatibility tests on the 2.9.x series
Make Stream.withFilter.{map,flatMap} run in constant stack space

The included test currently fails because `map` and `flatMap` do not
run in constant stack space on a stream returned by `Stream.withFilter`,
as I reported here:
https://groups.google.com/d/msg/scala-language/WqJR38REXnk/saaSiDdmyqoJ

Fix the problem and add a simple testcase.

Note that the stack space consumed when producing an element of this stream is
proportional to the number of elements failing the test before the next
success. The stack space consumed to produce the stream itself is the
space needed to produce the first element, that is, is proportional to
the number of failures before the first success.
Remove commented out code
Cleanup testcase

No need to check the output - checking programmatically that the
produced streams are empty is enough.
Improve test for Stream.withFilter.{map,flatMap}

Test a wider range of functionality.
Also check that Stream.toSeq gives the right result.
Merge pull request #1181 from Blaisorblade/topic/2.9.x-stream-const-space

Backport "Make Stream.withFilter.{map,flatMap} run in constant stack space" against 2.9.x
Merge pull request #1180 from jsuereth/fix/2.9.x-bc-tests

Initial cut at running binary compatibility tests on the 2.9.x series
Two fixes for the worksheet instrumenter

(1) Handle empty worksheets
(2) Handle for expressions

Review by @dragos
(cherry picked from commit 20dc9cd7848863097b07d1cb84ae3f729f7e94da)(cherry picked from commit 32cb44f9136a03e762baba420c0be2f4c27f4354)

Conflicts:

	src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
Added more variants to achieve getLinkPos

getLinkPos is known to be flakey. This commit tries some variants and logs what failed.
(cherry picked from commit 848756d47b980472996cd83409bda11f8fb5cac0)

Conflicts:

	src/compiler/scala/tools/nsc/interactive/Global.scala
Backport.

Adds method askForResponse

Adds method askForResponse which returns a response immediately instead of waiting for a result. That way, one can wait for an ask's result using a timeout.
(cherry picked from commit e896c0ab2d36740207f91086262e9feb4fc1c32d)

Conflicts:

	src/compiler/scala/tools/nsc/util/InterruptReq.scala
Merge pull request #1239 from dragos/backport/askForResponse

Backport method askForResponse
Merge pull request #1236 from dragos/backport/instrumeter-fixes

Backport `Two fixes for the worksheet instrumenter`
Merge pull request #1237 from dragos/backport/better-askLinkPos

Added more variants to achieve getLinkPos
Removed dead code.
(cherry picked from commit c03777b3acb3a4e921a27b58322d198e6d6c58f5)

Conflicts:

	src/compiler/scala/tools/nsc/scratchpad/CommentWriter.scala
Made instrumenter more robust by looking at tokens

Made instrumenter more robust by taking into account the positions of the tokens in the source. This allows us to reliably put instrumentation code at the end of the previous token, which tends to put it at end of lines. Furthermore, we now skip left parents. Previously, the instrumenter got confused for a statement like

( x + 1 )

because it thought that the statement started at the `x` and not at the `(`.

Another small change is that we now use decoded names in the worksheet. So ??? will show as ??? not $qmark$qmark$qmark.
(cherry picked from commit b2ecb931e13abb18c25ac6d49c18e974e1dd793e)

Conflicts:

	src/compiler/scala/tools/nsc/interactive/ScratchPadMaker.scala