Revised RootBeanDefinition's externallyManaged* Sets to rely on postProcessingLock

This allows us to avoid early initialization of footprint-heavy ConcurrentHashMaps, and reuses the existing postProcessingLock which will typically be active already when registerExternallyManaged* calls come in from the bean factory's post-processing phase.

Issue: SPR-11343
(cherry picked from commit a599b57)
Avoid class loading during AspectJ expression evaluation

Fixed through downcasting to AspectJ's ReflectionType and ReflectionBasedReferenceTypeDelegate, obtaining the myClass field there. We only fall back to regular class loading if we encounter any other kind of type.

Issue: SPR-11344
Polishing

Issue: SPR-11344
Quick paragraph on mvc namespace and matrix variables

Issue: SPR-11331
Preserve visitBeanDefinition stacktrace in BeanDefinitionStoreException

Issue: SPR-11346
Handle NoClassDefFoundError consistently for TELs

Prior to this commit, a NoClassDefFoundError caught in
TestContextManager's retrieveTestExecutionListeners() method would be
handled differently for implicit default listeners (i.e., listeners not
declared via @TestExecutionListeners) and listeners explicitly declared
via @TestExecutionListeners. Specifically, a NoClassDefFoundError would
cause a test to fail for an explicitly declared TestExecutionListener
but not for an implicitly declared one.

This commit addresses this issue by:

 - Always swallowing a NoClassDefFoundError for both implicitly and
   explicitly declared TestExecutionListeners.
 - Changing the log level from DEBUG to INFO to make such situations
   more visible to the average end user.

Issue: SPR-11347

Backport-Commit: fb12e234fcee416c4ea6359a2242ce7e3977b0b6
Factored out "suppressGetenvAccess()" method

Issue: SPR-11297
Polishing

Issue: SPR-11297
Introduced SpringProperties class and optional "spring.properties" file

This in particular allows for specifying "spring.getenv.ignore" and "spring.beaninfo.ignore" in a local way within the application, in case that JVM-level system properties are locked.

Issue: SPR-9014
Issue: SPR-11297
(cherry picked from commit 8543b91)
Polishing
Allow consolidating config in root context with Java

Issue: SPR-11357
(backported from 4.0.1)
Polishing

Issue: SPR-11357
Added test for SpringProperties setFlag method

Issue: SPR-9014
Issue: SPR-11297
Optimized Introspector.flushFromCaches calls to skip Object.class

Issue: SPR-11356
Polishing

Issue: SPR-11357
Polishing
Consistently switched optional dependencies to scope 'optional'; consistently grouped dependency scopes; minor dependency version updates
Compatibility with JOpt 4.6

JOpt 4.6 redeclared its nonOptionArguments() method from List<String> to List<?>, requiring us to select String arguments only as we do for regular option values already.

Issue: SPR-11359
(cherry picked from commit 67e76e9)
Consistently declare @SuppressWarnings("serial") instead of dummy serialVersionUID
(cherry picked from commit 56b7d7a)
Downgraded Commons Pool dependency to 1.5.7

Commons Pool 1.6 introduced generics in its APIs, leading to either a 1.6 dependency at runtime or a load of raw type warnings in our CommonsPoolTargetSource.