Fixing completion phase

A completer for a lazytype should run in the first phase
of the validity period of the denotation that gets completed.
Fix in NamedType#denot

Need to update checkedPeriod when new denotation is computed.
Make primitive conversions work also for non-numeric types

If the arguments to a primitive conversion are not both numbers, the
conversion will either return the argument itself, or throw a ClassCastException.
Added dummy pattern matcher

at the place forseen for the real pattern matcher, so that following
transformations do not have to deal with patterns.
Avoiding type applications after erasure.

Methods appliedTo and translateParameterizes only apply before erasure (except on arrays).
Also, computation of a potential expensive yet redundant lub in assignType(SeqLiteral) is
avoided.
Adapting containsPhase to phase groups

A list of names contains a phasegroup if it contains
any phase in the group.
Add -Ycheck capability

Right now uses a super-rudementary tree checker: we only check that every tree
has a type.
More fixes and tests for easure.

1. Object_isInstanceOf/asInstanceOf are no longer parameterized methods (seems there's
no point in writing x.$asInstanceOf[T]() instead of the shorter x.$asInstanceOf[T]).

2. Array constructor's type is unchanged (the previous rules erased it to

    def <init>(len: Int)Object

which is clearly wrong).

3. indexing needs to be disabled.

4. typedTypeApply needs to keep type applications that apply to type tests and type casts as well as
array ops.

5. References to self-ids are typed ThisType(cls) before erasure; are replaced by This(cls) references
during erasure.
Maintaining owners during transformations

The transformation framework needed to be changed so that contexts passed to
transformations have correct owner chains. These owner chins are demanded by
the Splitter phase.

Note: I eliminated the contexts array in TransformInfo because it interfered
with the owner computations. Generally, caching contexts with some phase is best
done in Contexts, because withPhase is also used heavily in othre code, not just in
Transformers.

New phase: Splitter

When it is complete, it will make sure that every term Ident and Select node
carries a symbol. Right now, all it does is coverting self reference idents to
"this"-nodes.
Added implementation of TypeTestsCasts#box
Renaming clear->setNew

clear is wrong. E.g. clearTyperState does not clear the typerstate at all. It installs a
fresh (i.e. cloned) copy of the previous one. clearScope is also wrong; it installs a new
scope, does not clear the current one.
Memoizing Context#withPhase

withPhase operations in contexts are now memoized.

Conflicts:
	src/dotty/tools/dotc/core/Contexts.scala
Factored re-typing logic into seperate ReTyper class

Refactored re-typing logic from erasure into seperate ReTyper class. Another candidate
subclass of ReTyper is a future TreeChecker.