Fix for #1546: metamodel refs to members of anonymous classes
cosmetic: small refactor to avoid computing stuff we won't need
Test for #1546: metamodel refs to members of anonymous classes
AnnotationInvocationVisitor: removed what appears to be dead code
AnnotationInvocationVisitor #1546: also accept anonymous class literals
Test for #1546: metamodel refs to members of anonymous classes in annotations