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.
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