Fixed type resolution for uninitialized factory-method declaration

Issue: SPR-11112
Fixed inner bean name determination for multi-level nesting scenario, calculating a unique bean name as early as possible now (and for any kind of bean scope)

Our per-bean caching in AutowiredAnnotationBeanPostProcessor and co relies on unique bean names, so this change fixes potential cache mismatch problems occuring there.

Issue: SPR-11131