SI-5314 - CPS transform of return statement fails

Enable return expressions in CPS code if they are in tail position. Note that tail returns are
only removed in methods that do not call `shift` or `reset` (otherwise, an error is reported).

Addresses the issues pointed out in a previous pull request:
https://github.com/scala/scala/pull/720

- Addresses all issues mentioned here:
  https://github.com/scala/scala/pull/720#issuecomment-6429705

- Move transformation methods to SelectiveANFTransform.scala:
  https://github.com/scala/scala/pull/720#commitcomment-1477497

- Do not keep a list of tail returns.

Tests:
- continuations-neg/t5314-missing-result-type.scala
- continuations-neg/t5314-type-error.scala
- continuations-neg/t5314-npe.scala
- continuations-neg/t5314-return-reset.scala
- continuations-run/t5314.scala
- continuations-run/t5314-2.scala
- continuations-run/t5314-3.scala
Replace CheckCPSMethodTraverser with additional parameter on transformer methods

Other fixes:

- remove CPSUtils.allCPSMethods
- add clarifying comment about adding a plus marker to a return expression
Fix SI-6208.  mutable.Queue now returns mutable.Queue for collection methods rather than MutableList.
Add missing cases in tail return transform

Disabled warnings that no longer apply because of tail returns.
Add several test cases.
Revert "Add missing cases in tail return transform"

This reverts commit 8d020fab9758ced93eb18fa51c906b95ec104aed.
Fix raw string interpolator: string parts which were after the first argument were still escaped
Improvement for SI-2251, failure to lub f-bounds.

After a great struggle, I realized that the major reason that
code like this still doesn't compile:

  List(Stream(), List())

is that we were poisoning the computed lub in mergePrefixAndArgs by
throwing in Any when the max recursion depth was reached. I modified
it to return NoType instead, which allowed me to teach lublist to
recognize what has happened and fall back to a weaker type, one
which does not contain recursive bounds. This enables the lubbing
process to complete. The most elusive lub, defeated. Notice also
that the refinement members are correctly parameterized on Nothing,
rather than on Any as has often been the case.

scala> List(Stream(), List())
res0: List[scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.LinearSeq with scala.collection.AbstractSeq]; def reverse: scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.LinearSeq with scala.collection.AbstractSeq]; def reverse: scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]{def reverse: scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]; def dropRight(n: Int): scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]; def takeRight(n: ...
Simplify the adaptation of types of return expressions

Add `adaptTypeOfReturn` hook to `AnnotationCheckers`.
Move adaptation of types of return expressions from `addAnnotations`
to `typedReturn` via `adaptTypeOfReturn` hook.

This resolves an inconsistency where previously types could have
a plus marker without additional CPS annotations. This also adds
additional test cases.
.ensime template for compiler development

Provides a template of an .ensime file to be used for compiler hacking
together with an ENSIME-enabled text editor.

Also includes a readme that outlines what editors support ENSIME.
To the best of my knowledge these are Emacs, TextMate, jEdit and Sublime Text 2
Improve efficiency of updated

Added utility method to create a HashTrieSet with two leaf HashSets with different hash
Used said utility method instead of creating a temorary HashTrieSet with an empty elems array
Added assertions to HashTrieSet to validate tree
Rewrite of transformTypeTagEvidenceParams.

This fixes what a bug where the prefix seems to be checked but
is ignored; however I rewrote this method purely out of a desire
for tighter code.  I would consider it a great personal
favor if you would study the before/after and endeavor to
internalize the mechanisms I applied.

Points of particular note:

 - Before you write Option[Symbol], remember we already have
   an Option[Symbol], and it's Symbol.  None == NoSymbol.
 - flatMap can be to an Option, you don't have to create a
   one element List for flatMap's enjoyment
 - lastOption and headOption are rarely the way to go
   ... especially if you start with if (xs.isEmpty) return
 - The method which checks for emptiness is ".isEmpty",
   it is NOT ".length == 0"

I should add a pattern matcher warning for when you have a lower
case name in scope (like "contextParam") and then use a lower case
pattern variable of the same name, which of course ignores the
one outside the pattern and matches everything.

Review by @xeno-by.
SI-5940 impls are no longer in macro def pickles

The first officially released version of macros persisted
macro def -> impl bindings across compilation runs using a neat trick.

The right-hand side of macro definition (which contains a reference to an impl)
was typechecked and then put verbatim into an annotation on macro definition.

This solution is very simple, but unfortunately it's also lacking. If we use it
then signatures of macro defs become transitively dependent on scala-reflect.jar
(because they refer to macro impls, and macro impls refer to
scala.reflect.macros.Context defined in scala-reflect.jar).
More details can be found in https://issues.scala-lang.org/browse/SI-5940.

Therefore we have to avoid putting macro impls into binding pickles and
come up with our own serialization format. Situation is further complicated
by the fact that it's not enough to just pickle impl's class and method names,
because macro expansion needs knowledge about the shape of impl's signature
(which we can't pickle). Hence we precompute necessary stuff (e.g. the layout
of type parameters) when compiling macro defs.
macro implementations must be public

The immediate motivator for this change was the desire to keep things simple
during macro expansion.

Here's the story. When you expand a macro, you need to reflectively load
a macro implementation method and invoke it. However private methods in Scala
can sometime have their names mangled, so the reflector has to check multiple
variants of the same name (the normal one and the mangled one).

The problem is that since the previous commit we don't have an access to a
symbol of the macro impl, hence we cannot just use `impl.expandedName` like
we did before. Sure I could duplicate the logic of expandedName, but I have
a better suggestion.

Let's prohibit non-public macro implementations. This doesn't seem to hurt,
and it lets us avoid extra bit of complexity in Macros.scala.

If this measure turns out to be a hassle during the trial period of macros,
non-public macros can always be allowed. In fact, we can even have this feature
back for free when we migrate from Java reflection to Scala reflection for
invoking macro implementations (because Scala reflection knows how to account
for mangled private names). But that's the 2.10.x business.
HIDDEN => ARTIFACT

This test is necessary in the API to tell apart useful synthetic symbols
(such as accessors) and low-level compilation artifacts (such as $outer).

However `isHidden` (as it's currently named in the compiler) is too generic.
Hence I renamed it along with the corresponding flag. Now the test says
`isArtifact` and the flag is named ARTIFACT.

Despite being an improvement over the first version, `isArtifact` is
still a bit unlucky. The name I like is `isImplementationArtifact`, but that's
a mouthful to be used in compiler hacking. Moreover, IMPLEMENTATION_ARTIFACT
looks weird.

For a discussion about related stuff see:
http://groups.google.com/group/scala-internals/browse_thread/thread/d04e762127737968
https://github.com/scala/scala/pull/1114
accommodated the feedback for the pull request

For the discussion see: https://github.com/scala/scala/pull/1101
don't crash on unsupported pattern -- diagnose
Merge pull request #1101 from scalamacros/ticket/5940

SI-5940 impls are no longer in macro def pickles
don't catch StackOverFlowError: kills performance

instead, use a recursion counter in negationNormalForm as in conjunctiveNormalForm
(except we only limit recursion depth, not formula-size
 reuse the same config variable in hopes it'll do for both)
Add Scaladoc flag to specify hidden implicit conversions
Merge pull request #1134 from adriaanm/patmat-misc

patmat tweaks: compiler performance, better error on unsupported pattern