New phase: Nullarify

Eliminates ExprTypes and PolyTypes over value types.
Fix Nullarify treating all 'apply' methods as Function0
Merge pull request #122 from dotty-staging/transform/nullarify

Transform/nullarify
Allow bringForward to "initial run"

A completer could need to complete a method in initial run. Bring forward should handle that case.
Erasure of term refs without symbols

Need to allow for possibility that term ref does not have a symbol (e.g. termrefs with union prefixes do not
always have symbols).
Fix withSymAndName

There was a mismatch between symbol and signature before.
Removing duplication between Any and Object methods

We cannot have same named methods defined in Object and Any because after erasure
the Any references get remapped to the Object methods which would result in a double binding
assertion failure.

Instead we do the following:

 - Have some methods exist only in Any, and remap them with the Erasure denotation
   transformer to be owned by Object.
 - Have other methods exist only in Object.

To achieve this, we synthesize all Any and Object methods; Objetc methods no longer get
loaded from a classfile.

There's a complication with getClass. We need to reconsider what the best treatment of getClass is.
Right now there's too much magic going on for my taste. It might be better to leave getClass on Object only as it
is in Java, forget about the special treatement of its type, and have another getClass like method in
an decorator on class Any. That could produce the right types and could also work for primitive types.
Revert "Allow bringForward to "initial run""

This reverts commit 29976d7922c5c3e99f0469e3db11b391d39a2b24.
Fixing stillValid code

We need to take into account that symbols can can have non-class owners yet still be valid.
Previously such symbols were treated as invalid. Now they are valid if their owners are valid.

The commit supersedes

29976d7922c5c3e99f0469e3db1

which got reverted.
Added a unique identifier to trees.

Used for debugging purposes for now. Might be used for replaying IDE interactions later.
Some more debug info.
isAfterTyper test

Add test whether we are after typer. Use it to assert that
eta expansion and implicit search do not happen after typer.
Avoid -Ycheck after errors
Better printing of type variables

Will now print the full chain of instances using ? for uninstantiated and ' for
instantiated.
Avoid checking for tpt non empty in implicit defs after typer.

The check assumes that inferred TypeTrees do not exist yet, but after
the typer they do exist.
Addiong an adapt to implicit parameters.

Implicit parameters were not adapted to the formal argument before which
caused a -Ycheck violation.

Todo: we should find out whether we can do without the adapt in typedImplicit whose result
is afterwards thrown away.
Making reporters configurable

Add method to install a new reporter in a subcontext's typer state.
Refining TreeChecker to work immediately after typer.

Making TreeChecker work immediately after typer. This requires a number of fixes.
Also, errors now cause exceptions instead of being reported on the command line.
Fix of TyperState#instType

If a type variable TV1 is instantiated to a poly param, and the poly param
is itself accomanied by a type variable TV2, then the instance of TV1 should
be TV2 and not the original poly param. Otherwise we lose instantiations. This
is demonstrated by running dotc on the .scala files in the dotc directory itself
with option -Ycheck.
Make sure AnyVal is loaded by classfile parser.

In dotc, AnyVal is a synthetic toplevel class. We need to make sure it is not loaded by
the classfile parser from scala.AnyVal. To do this, the companion module class needs to be
marked as absent (by setting its info to NoType).

Also, added Repeated annotation which will be used in the next commit.