Fix import generation for anonymous classes

Change order of statements to use erasure instead of narrowed type.
Anonymous classes can extend interfaces and classes with type parameters.
When generating imports we should use erasure of type instead of narrowed type.
Allow interfaces to be private.

Interfaces can actually be private in Java.
It is seldomly usefull to support abstraction barrier.
Ignore empty list of type-arguments when narrowing type.
Merge pull request #1 from sviperll/master

Fixes for issues I've found working on real project with jcodemodel