Added infix methods for some tree constructions

Added several forms of "select" and "appliedTo" methods which construct Select, Apply, TypeApply
trees.

Motivation: Infix methods allow chaining which is more legible than deep nesting.
New micro phase: Literalize

Convert expressions with constant types to Literals.
New Flag: Inline

Added now because it affects purity if expressions: Inlined pure values
are pure even if referenced from impure prefixes (i.e. prefix need not
be evaluated).
Revised purity tests in TreeInfo

Added two levels: pure and idempotent and fixed what look like
obvious bugs. It seems the previous treatment confused the two
levels.

Changed EtaExpansion and Erasure to use Pure instead of Idempotent
where appropriate.
Fix bad type passed to indexOf.

This is a trap waiting to happen elsewhere as well. Not clear how to avoid it.
Move valueclass functionality into its own ValueClass module.
Add definedPeriodsString method for disgnostics.
Make TypeParamCreation flags depend on owner

Type params should have different flags, depending on whether they are
owned by a method or a class. Only class type parameters are marked Deferred,
protected, and Local.
Invalidate member caches in different periods

A membercache is not valid in a period different from the one it was
created in. Reason: The denotations stored in the cache might have
different infos in different periods.

Also: add maybeOwner convenience method for printing, which handles
NoDenotation/NoSymbol gracefully.
Fixes to MacroTransform and TreeTransformer

1) Make local context go to module class if the tree symbol is a package val.
   Perviously, this gave the wrong context owner for package definitions.

2) Add a hook to define the phase in which a transform should be run.
Make more Definition methods depend on implicit context argument

The problem is that exploration methods are run and phase dependent,
whereas Definitions has an implicit context that freezes the period
when Definitions ewas created.

We should complement this by splitting Definitions into a global and
per/run part, but that is independent of the change in this commit.
Avoid some classes of StaleSymbol errors

If a symbol is defined in phases M..N, and that
symbol is then accessed in a phase before M, but in a new run,
we should not issue a stale symbol error (after all, the
symbol is not defined yet). Instead we now return a
NoDenotation.
Add unique ids for definitions

If -uniqid is on, RefinedPrinter now prints unique ids in definitions.
Small cleanups and additions.
Fixes to TypeUtils

Some fixes to toStatic. Also added a method that transforms a RepeatedType to the corresponding Seq type.
New phase: ElimRepeated

Makes sure there are no references to RepeatedParamClass left in the types.
Also added placeholder for ElimLocals, which remains to be written.
Revamped TreeTypeMap

TreeTypeMap needs to track all binding occurrences and propagate maps
to all usage occurrences.

Also, fixed `ref` for prefixless types (these mapped to a SelectFromType tree before,
now are mapped to Idents).
Enabled ExtensionMethods

Fixed extension methods so that it now runs and passes the build.
Also enables ElimRepeated, which is a prerequistite for ExtensionMethods.

Exception: Tailrec is currently disabled, because it needs to run before
ExtensionMethods but it fails the -Ycheck test. Therefore the current tests
skip this phase.