SI-5151 - Add firstKey and lastKey to LongMap.
replace symbols correctly when subtyping dependent types

as discussed in [1], this change has no impact on the scala type
system, but it can fix subtyping for annotation checkers if the
pluggable type system supports annotations that can refer to method
parameters.

[1] https://groups.google.com/forum/#!topic/scala-internals/kSJLzYkmif0/discussion
case module toString is synthetic
Allow for Function treess with refined types in UnCurry.

Also removes an unnecessary condition in UnCurry, isFunctionType(fun.tpe)
is always true.
Keep annotations when computing lubs

Integrates annotationsLub into lub.

Also fixes SubstSymMap when mapping over annotaion trees. I don't
understand what the previous code was supposed to achieve, but it
crashed in some of my examples.
SI-1803, plus documentation and cleanups in Namers, mainly in typeSig

- when typing (and naming) a ValDef, tpt and rhs are now type checked
in the same context (the inner / ValDef context). this does not change
any behavior, but is more uniform (same as for DefDef). martin told me
(offline) that this change is desirable if it doesn't break anything.
(it doesn't).

- typeSig is now more uniform with a separate method for each case
(methodSig, valDefSig, etc). methodSig was cleaned up (no more variables)
and documented. the type returned by methodSig no longer contains /
refers to type skolems, but to the actual type parameters (so we don't
need to replace the skolems lateron).

- documentation on constructor contexts, type skolems

- more tests for SI-5543
Analyzer Plugins

AnnotationCheckers are insufficient because they live outside the
compiler cake and it's not possible to pass a Typer into an annotation
checker.

Analyzer plugins hook into important places of the compiler:

  - when the namer assigns a type to a symbol (plus a special hook for
    accessors)
  - before typing a tree, to modify the expected type
  - after typing a tree, to modify the type assigned to the tree

Analyzer plugins and annotation checker can be activated only during
selected phases of the compiler.

Refactored the CPS plugin to use an analyzer plugin (since
adaptToAnnotations is now part of analyzer plugins, no longer
annotation checkers).
Fix context for type checking early initializers

Before:

scala> class A { class C extends { val x: A = this } with AnyRef }
<console>:7: error: type mismatch;
 found   : A.this.C
 required: A
       class A { class C extends { val x: A = this } with AnyRef }
                                              ^

Note that the same thing is necessary and already done in Namers (see
def createNamer). The whole logic of when and how to create contexts
should be factored out and reused in Namer and Typer.

(
My Hobby [1]: detecting compiler by just looking at its soruce
[1] http://www.explainxkcd.com/wiki/index.php?title=Category:My_Hobby
)
Merge commit 'f3cdf146709e0dd98533ee77e8ca2566380cb932'

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/Contexts.scala
	src/compiler/scala/tools/nsc/typechecker/Namers.scala
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
	src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala
	src/reflect/scala/reflect/internal/AnnotationCheckers.scala
	src/reflect/scala/reflect/internal/Symbols.scala
SI-6773 Changes IndexSeqFactory to be "since 2.11"

The addition of IndexSeqFactory to 2.10.x branch created a binary
incompatibility so it was removed in that branch before being released.
This commit fixes the since annotation to 2.11 on IndexSeqFactory in the
master branch.
Merge pull request #2061 from lrytz/analyzerPluginsMaster

Merge Analyzer Plugins for Master
Merge pull request #2071 from JamesIry/master_SI-6773

SI-6773 Changes IndexSeqFactory to be "since 2.11"
Merge pull request #2042 from mt2309/SI-5151

SI-5151 - Add firstKey and lastKey to LongMap.