Cache.get(key, type) explicitly defines an IllegalStateException in case of a type mismatch

Issue: SPR-12145
(cherry picked from commit 2f93759)
AbstractAutowireCapableBeanFactory avoids early FactoryBean instantiation on currently created configuration bean

Issue: SPR-12141
(cherry picked from commit 4432c41)
Polishing