Add missing case where isHKSubType is needed

Was not called when comparing a named type with an #Apply projection. The commit fixes this.
Make refines work for aliases

refines needs to be made more stable, so that also aliases and derefernces typevars are recognized as prefixes.
Avoid caching values that depend on typevar state.

TypeVars flip from the initial state, where underlying == origin to the final state
where underlying == inst. This flip can invalidate information that depends on the underlying
type of a TypeVar. Since we do not know when the flip occurs, we need to avoid keeping
any such information in a cache.

The commit makes three caches depend on a new value: typerState.ephemeral. The value is
set to `true` each time we follow the underlying type of a TypeVar, and this disables cached
information to be retained.

A test case for this commit is t2693.scala. This test passes typechecking with the previous commit,
but fails in -Ycheck:front because of stale cache info in an "#Apply" typeref. The present commit fixes that.
Merge pull request #136 from dotty-staging/fix/systematic-prototypes

Fix/systematic prototypes
Use the final scala 2.11.
Merge pull request #138 from folone/master

Use the final scala 2.11.
Avoid crashing on name tests when name is empty.

Guard every occurrence of name.head with a test whether name.length > 0
Bring LambdaClass inline with its doc comment.

Avoid special treating TermRef, as this is not demanded by the
comment and does not change any of the test outcomes.
Improved documentation

Added explanations where suggested by Adriaan in his review.
Added test case for LMS inspired HK code.

Closes #94.
Merge pull request #137 from dotty-staging/change/higher-kinded

Change/higher kinded
Add cloneScope method and handle versioning of ClassInfo#decls

This is done to streamline changing class denotations in new phases
by adding to (or otherwise modifying) their decls scope.
Make SuperAccessorName and extractor.

Should do the same with other name-creator/name-test pairs.
Added MacroTransform as a transformer template for macro phases.
New utitility methods in tpd.

Added the following utility methods:

 - polyDefDef: Create a DefDef given a function that takes type and value parameters and yields a body.
 - appliedToTypeTrees: Apply function to type arguments ion a TypeApply if arguments are nonempty.
 - mkAsInstanceOf
 - ensureConforms: generate a cast if expression has non-conforming type.
ThisType trees have their class as a denotation

Added this case, so that .symbol on a ThisType returns the underlying class.
Error method for implementation restrictions
Improved printing of flags

(1) Make sure ModifierFlags is TermFlags and TypeFlags
(2) Shorten private <local> to private[this]; same with protected
(3) Print [this] for local symbols in RefinedPrinter
Added phase: SuperAccessors

Rewrote SuperAccessors (more to be done; see comments), and
added stuff here and there to make it work smoother.
Rename SignedType -> MethodicType

... for the common supertype of MethodType, PolyType, and ExprType.
Signed was confusing.