[nomaster] teaches toolbox about -Yrangepos

Unlike in master, in 2.10.x enabling -Yrangepos requires instantiating
Global with mixed in RangePositions trait.

Same story for toolboxes. Just setting Yrangepos is not enough - one
needs to mix in RangePositions into ToolboxGlobal. I didn’t know that
back then, so now I’m fixing the oversight.

The commit is marked as [nomaster], because -Yrangepos doesn’t need
special treatment in master.
Merge pull request #3196 from retronym/topic/3190-fixup

Corrects positions for Dynamic calls
Merge pull request #3180 from xeno-by/topic/toolbox-rangepos

teaches toolbox about -Yrangepos
SI-7548 askTypeAt returns the same type whether the source was fully or targeted type-checked

When asking for targeted typecheck, the located tree may have overloaded types
is the source isn't yet fully typechecked (e.g., a select tree for an
overloaded method). This is problematic as it can lead to unknown 'hovers',
broken hyperlinking that suddenly starts working, unresolved ScalaDoc comments,
and similar, in the Scala IDE.

With this commit we are hardening the contract of `askTypeAt` to return the
same type whether the file was fully type-checked or targeted type-checked.
This is done by preventing the typechecker to stop too early if the `located`
tree has an overloaded type. Furthermore, I'm assuming that if `located.tpe`
is of type `OverloadedType`, by letting the compiler carry-on the typechecking,
the `located.tpe` will eventually be resolved to a non-overloaded type. Said
otherwise, I expect the targeted typechecking will always terminate (if my
reasoning isn't sound, please say so).

The test provided with this commit demonstrates the new behavior (the position
used to execute the test is resolved to the `foo` method's call). In fact,
before this commit, executing the test returned the following:

    (x: Int, y: String)Unit <and> (x: String)Unit <and> (x: Int)Unit

Showing that the tree's type is an overloaded type. The ambiguity is fixed by
this commit, and in fact the test's output is now:

    (x: Int)Unit
SI-7548 Test to demonstrate residual exploratory typing bug

We shouldn't observe tree types under silent mode.

The enclosed test is a standalone version of `1 + BigInt(2)`,
a standard example of exploratory typing in Scala. Once we determine
that none of the `+` methods in `Int` accepts (possibly implicitly
coerced `BigInt`), we have to backtrack and look for a view from
`Int => { +(_: BigInt): ? }`.

The next commit will correct the problem.
SI-7458 Pres. compiler must not observe trees in silent mode

Otherwise we can think that `+` in `1 + BigInt(2)` refers
to a method in `Int`.

In general, this protects the IDE from observing results from
"exploratory" typing which is discarded as the compiler backtracks
to another possibility.

This protection subsumes the condition that checked for overloaded
types: presentation/t7458 now passes without this.
Merge pull request #3208 from dotta/si-7548-on-2.10

 askTypeAt returns the same type for full/ targeted typecheck (2.10.x)
SI-6913 Fixing semantics of Future fallbackTo to be according to docs

Origin: viktorklang@1bbe854
Merge pull request #3181 from heathermiller/issue/6913

SI-6913 Reapplies a lost fix by @viktorklang
SI-7982 Changed contract of askLoadedType to unload units by default

The rationale for not keeping units loaded by default is that the more
units are loaded, the slower is background compilation. For instance, in
the Scala IDE for Eclipse (which uses the presentation compiler),
typechecking occurs every time the reconciler kicks-in (~500millis after
you stop typing), hence it is important that units are not kept loaded
unless strictly necessary (for some extra information about this, see
https://www.assembla.com/spaces/scala-ide/tickets/1001388)

While I agree that using a boolean argument (`keepLoaded`) for deciding
if a unit should be loaded isn't a great design, other methods in
`CompilerControl` also have a keepLoaded parameter, so at least we have
some consistency. For the future, I'm thinking we should be able to
remove the `keepLoaded` flag altogether, and change the implementation
of `askLoadedType` to preserve the same units loaded in the presentation
compiler before and after its execution. Basically, if you want a unit
to be kept loaded, you should call `askReload` first, and then
`askLoadedType`. However, to reduce impact, I think the changes carried
by this commit will help us estimate if the solution I just outlined is
viable (because `askLoadeType` won't be keeping units loaded by default,
which wasn't the case with the former implementation).

(While the patch was mostly contributed by @huitseeker, @dotta has edited the
commit message to preserve the comments in the PR
https://github.com/scala/scala/pull/3209)
Merge commit 'da73950' into merge-2.10.x-to-master
Merge commit '7c1d114' into merge-2.10.x-to-master

Conflicts:
	src/compiler/scala/tools/nsc/interactive/Global.scala
Merge commit '7d74884' into merge-2.10.x-to-master

Conflicts:
	test/files/jvm/scala-concurrent-tck.scala
Merge commit '7d41094' into merge/2.10.x-and-pr-3209-to-master

Conflicts:
	src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
Merge pull request #3228 from retronym/merge/2.10.x-and-pr-3209-to-master

Merge #3209 and 2.10.x to master