QualifierAnnotationAutowireCandidateResolver calls BeanFactory.getType defensively

Issue: SPR-12191
(cherry picked from commit 73ce3b5)
Polishing
(cherry picked from commit 2956049)