SI-7915 Corrected range positions created during default args expansion

The tree created during expansion of default arguments contained trees with the
wrong type of positions. Let's discuss this with an example. Below is the tree
generated for the `foo` method in the test class included in this commit.

Before this commit:

```
[54:94]def foo(): [58]Unit = <70:90>{
  [70:79]<artifact> val qual$1: [70]Bar = [70:79][70:79][70:79]new [74:77]Bar();
  [80]<artifact> val x$1: [80]Int = [80]qual$1.bar$default$1;
  <70:90><70:83>qual$1.bar([80]x$1)
}
```

Now:

```
[54:99]def foo(): [58]Unit = <70:95>{
  <70:84><artifact> val qual$1: [70]Bar = [70:84][70:84][70:84]new [74:77]Bar();
  [85]<artifact> val x$1: [85]Int = [85]qual$1.bar$default$1;
  <70:95>[84:88]qual$1.bar([85]x$1)
}
```

Here are the list of changes:

* The synthetic `qual$1` has a transparent position, instead of a range position.
* The new Select tree (i.e., `qual$1.bar`) should always have a range position,
  because `selected` (i.e., the called method) is always visible in the source
  (in fact, this is the whole point of the fix, we need a range position or
  hyperlinking request from the Scala IDE won't work).
* The Block that contains the expanded default arguments is forced to have a
  transparent position, as it never exist in the original source.

The tricky part of the fix is the position assigned to the new Select tree,
which needs to respect the range position's invariants. In the specific case,
we ought to make sure that range positions don't overlap. Therefore, the position
assigned to the new Select tree is computed by intersecting the original Select
position (i.e., `baseFun`'s position) and the original qualifier's position
(i.e., `qual`'s position).

If you take a closer look at the range positions assigned in the tree after this
commit, you'll notice that the range position of the `qual$1`'s rhs (i.e.,
[70:84]), and `qual$1.bar` (i.e., [84:88]) might seem to overlap, because the
former ends where the latter begins. However, this not the case because of the
range position's invariant 2, which states:

> Invariant 2: in a range position,  start <= point <  end

Hence, the above two positions aren't overlapping as far as the compiler is
concerned.

One additional aspect (that may look like a detail) is that we make sure to
never generate a position such that its start is after its end. This is why we
take the position with the smallest end point.

Furthermore, calling `withStart` would turn any position in a range position,
which isn't desiderable in general (and, even worse, this can lead to
generation of invalid positions - bad offsets - if the computation is performed
on offset positions). Hence, the position's computation is only performed when
both `baseFun` and `qual` positions are range positions. Indeed, I expect this to
be always the case if the compiler is started with -Yrangepos.

(cherry picked from commit 3009a525b58a4c7865ff524899b85518884ee5f7)
[nomaster] Test infrastructure for scope completion

Adds a new marker /*_*/ to trigger scope completion test.
Original type completion test oracles update for the tweaked output
(cherry picked from commit 9c7c66ff7907e3ab814f0f4375eeaf6cdd230d5e)
[nomaster] Adds test cases for scope completion

(cherry picked from commit 3d55fe723f1af91f4d2db421f0e0965c583346dc)
[nomaster] SI-7280 Scope completion not returning members provided by imports

Updates localeContext() to return the best context possible when there are none directly
associated with the given position. It happens when an expression cannot be
successfully typed, as no precise ContextTree covers the expression location, or if the
position is not inside any expression.
Adds corresponding tests
(cherry picked from commit 3028327e2a2b553b12ee45519413515c8aa0865f)
Merge pull request #3157 from dotta/backport/2.10.x/si-7915

Backport of SI-7915
Merge pull request #3166 from skyluc/issue/completion-import-object-7280-210

Backport of
SI-7463,SI-8003 Correct wrong position for {select,apply}Dynamic calls

The new positions are range positions that directly refer to the
beginning and the end of the method calls in the sources instead of
simply point to the beginning of the expression. This allows the
scala-ide to semantically highlight select- and applyDynamic method
calls, because it has only to traverse the tree and apply the color
ranges to the given position ranges.

This also fixes the position marker of an error messages related
to a wrong Dynamic method signature.
SI-8004 Resolve NoPosition error for applyDynamicNamed method call

Previously, there were no positions created for the tuples that are
generated while doing the transformation for an applyDynamicNamed call.
This led to an NoPosition error in scalac when one tries to show
position information in the AST. Furthermore, this simplifies semantic
highlighting in the scala-ide because no position information for color
ranges have to be created anymore.
SI-8005 Fixes NoPositon error for updateDynamic calls

Previously there occurred a NoPosition error when one asks for position
information in the AST because no positions were set to the trees
created during the transformation for updateDynamic calls. This commit
applies range positions to the trees in order to being able to highlight
them inside of the scala-ide.
Merge remote-tracking branch 'origin/2.10.x' into merge/2.10.x-positions-to-master
Merge remote-tracking branch 'origin/pr/3196' into merge/2.10.x-positions-to-master

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
	test/files/neg/applydynamic_sip.check

 - Changes two calls from `.endOrPoint` to `.point`. The latter
   is safe in master for both `Range`- and `OffsetPosition`s
 - Updates checkfiles with unrelated position changes (constructors)
Merge pull request #3197 from retronym/merge/2.10.x-positions-to-master

Merge 2.10.x, and PR #3196, to master