Report errors for usage of private types when generating declaration file

Currently this change reports errors only for heritage clause and constraints of type parameters if the name is not public
module m {
    export class c {
    }
}

var x: typeof m.c

In this example when we look if the symbol constructor function m.c is accessible, we will start with the symbol for c. Since c is not directly in the scope - the answer here that is accessible symbol is going to be undefined. But that doesn't mean m.c is not accessible. It is accessible if the parent m is accessible.