Fix of #50 - volatile

Volatile checking needs to take all intersections into account; previously these
could be discarded through needsChecking.

Plus several refactorings and additions.

1) Module vals now have Final and Stable flags set
2) All logic around isVolatile is now in TypeOps; some of it was moved from Types.
3) Added stability checking to Select and SelectFromType typings.

Todo: We should find a better name for isVolatile. Maybe define the negation instead under the name
"isRealizable"?.
Improve test infrastructure

1) New method compileFiles which allows one to compile the content of a directory one file or directory
after another.

2) max constraint is printed to typr.

Added new test pos_all. Other pos tests can be retired.
Merge pull request #54 from odersky/Improve/better-tests

Improve test infrastructure
Fix for t1002

Need to compile the self type of a class not in the context of the class members but one context further out.
Reason: self type should not be able to see the members.
Fix problems related to t0039

This test case exercised several problems:

1.)2.) Two ways to run into a cyclic references. Fixed by
 - assuming an early info when completing a typedef, similarly to what is done for a classdef
 - doing wellformed bounds checking in a later phase.

Failure to check whether arguments correspond to F-bounds.
 - a substitution was missing.
Added lost comment to isVolatile.
Merge pull request #60 from odersky/fix/#50-volatile

Fix/#50 volatile
Fix constructor completion problem detected in t0054

Constructors need to be completed in the context which immediately encloses
a class. Otherwise type references in the constructor see the wrong types,
as is demonstrated in t0054. The difficulty here is that the inner class B
nested in A also extends from A. Then it makes a difference whether the constructor
parameter types of B are resolved in the context of B or in the context of A.
Added explanation for context handling of constructors.
Merge pull request #61 from odersky/fixes-t00xx

Fixes t00xx
Added test for implicits which fail in Scala 2.11.

Mentioned in scala-user by Haoyi Li on 12-Mar-2014
Merge pull request #63 from odersky/implicit-test

Added test for implicits which fail in Scala 2.11.
Fix of #56 - newModuleSymbol & newCompleteModuleSymbol

Needs new TypeRef creation method that works for NoPrefix and at the same time
does not need a denotation. This is provided by method TermRef.withNakedSymbol.
Fix for #55

Distringuish between ModifierFlags -- which can appear in trees -- and SourceModifierFlags -- which are
modifiers according to the language spec.
add tests from scala/test/files/{pos,neg}

with explicit Unit return type
PostTyper transformers

1) reorders companion objects so that they allways follow matching
classes
2) removes imports and named arguments
3) rewrites all trees holding types are to TypeTrees
TreeTransform: add support for transforming stats

Added a prepareForStats&transformStats pair of methods,
which provide a convinient way to alter scopes of
PackageDefs, Templates and Block's.
CreateCompanionObjects transformer

A transformer that provides a convenient way to create
companion objects.
Merge pull request #64 from DarkDimius/PostTyperTransformer

Post typer transformer
Merge pull request #65 from samuelgruetter/scala-tests-raw

Add untried tests from scala/test/files/{pos,neg}
Bullet-proofing companion objects

Companion class/module computations now also work for local classes and modules. For this to work,
either one of two conditions must be met: (1) some enclosing context refers to a scope that
contains the companions. (2) the context's compilation unit has a typed tree that contains the
companions. (1) is usually true when type-checking, (2) when transforming trees.

Local companions are searched as follows: If (2) holds, we locate the statement sequence containing
the companions by searching down from the root stored in the compilation unit. Otherwise, we search
outwards in the enclosing contexts for a scope containing the
companions.