harden test case to avoid parsing failure when name is keyword
refactor out common logic between various statSeq-s in parser

Partial functions are left outside of the call to statSeq to allow
re-use and overriding capabilities for quasiquotes.
refactor out range position utility constructors

This will help to re-use same logic for creating range positions even
if atPos isn't used to assign position to the tree.
SI-6841 SI-6657 add support for packages into quasiquotes and toolbox

In order to implement this a new parser entry point
`parseStatsOrPackages` that augments current parseStats with ability
to parse "package name { ... }" syntax.
minor changes due to typos
use regular macro expansion logic for unapply quasiquotes

Previously due to limited support for expansion in apply position
quasiquotes had to use a compiler hook for deconstruction. Now with
recent changes in pattern matcher it's possible to remove that special
case.
Disable flaky presentation compiler test.

Francois is investigating the root cause as part of his
work on stabilizing Scaladoc preview in the IDE.

The test seems to only fail on the windows nightly build.
I suspect this is due to a slower or loaded machine.
Disable tests for SI-7020

These are still impudently being non-deterministic.

I've reopened the ticket so we can take another swing at it.
A well targetted s/HashMap/LinkedHashMap/ will almost certainly
be the salve.

	fail - neg/t7020.scala  [output differs]% scalac t7020.scala
	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((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
	 List(5) match {
	     ^
	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((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
	 List(5) match {
	     ^
Merge pull request #3043 from retronym/topic/flaky

Disable flaky tests
Merge remote-tracking branch 'origin/2.10.x' into merge/2.10.x-to-master-4
advanced fresh name reification

During parsing some names are generated artificially using freshTermName & freshTypeName (e.g. `x$1`). Such names should be reified in a different way because they are assumed to be always fresh and non-overlapping with the environment. So `x$1` should reify down to equivalent of `freshTermName("x$")` rather than `TermName("x$1")`.

But this is not enough. One name can be used more than once in a tree. E.g. `q"_ + 1"` desugars into `q"x$1 => x$1 + 1"`. So we need to ensure that every place where `x$1` is used gets the same fresh name. Hence the need for `withFreshTermName` that lets q"_ + 1" quasiquote desugare into equivalent of `withFreshTermName("x$") { freshx => q"$freshx => $freshx + 1" }`.

For pattern quasiquotes it's a bit different. Due to the fact that end-result must be a pattern we need to represent fresh names as patterns too. A natural way to express that something is fresh is to represent it as a free variable (e.g. any name will do in that place). But due to possible use of the same name in multiple places we need to make sure that all such places have the same values by adding a sequence of guards to the pattern.

Previously such names were reified naively and it could have caused name collision problems and inability to properly much on trees that contain such names.
make q"f(..$xs)" deconstruction symmetrical to q"f[..$xs]"
better name for isCaseDefStart

As it was pointed out by @paulp current isCaseDefStart method's name
doesn't really correspond to one of it's primary usages: checking if
the block within case has reached it's end.
fix minor regression in quasiquote reification

emptyValDef should always be reified as emptyValDef. After the the
introduction of SyntacticValDef this ceased to be true.
rename selfdef into selfType

For sake of consistency with noSelfType.
move fresh name creator into scala.reflect.internal.util
decrease duplication of fresh* function definitions

This commit extracts out freshTermName and freshTypeName to the top-level
with implicit fresh name creator argument. This will let to refactor out
more methods out of tree builder into treegen that are dependent on fresh
name generator. We also save quite a bit of boilerplate by not having to
redefined fresh functions all over the place.
eliminate isCaseDefEnd override by moving the logic into stock parser
use NameTransformer.encode for fresh name prefix sanitization
re-wire fresh name creator to currentUnit.fresh at compile-time