Extend AnnotationMetadata and MethodMetadata

Update AnnotationMetadata and MethodMetadata to extend from a new
AnnotatedTypeMetadata base interface containing the methods that are
common to both. Also introduce new getAllAnnotationAttributes methods
providing MultiValueMap access to both annotation and meta-annotation
attributes.

Existing classreading and standard implementations have been
refactored to support the new interface.
Support for @Conditional configuration

Introduce new @Conditional annotation that can be used to filter
which @Configuration classes or methods are loaded. @Conditional
can be used directly or as a meta-annotation. Condition implementations
are provided via the 'Condition' interface and are free to filter based
on any criteria available at the time that they run. The
ConditionalContext provides access to the BeanDefinitionRegistry,
Environment and ConfigurableListableBeanFactory along with a
ResourceLoader and ClassLoader.

The existing @Profile annotation has been refactored as a @Conditional
with the added benefit that it can now be used as a method level
annotation.
Improve subclassing support in ConfClassPostPro

Update ConfigurationClassPostProcessor with an additional
afterLoadConfiguration method that can be overridden by subclasses.

Also add a protected getMetadataReaderFactory() method allowing
subclass access to the MetadataReaderFactory.
Add MetadataReaderLog interface

Add a MetadataReaderLog callback interface that can be used with
SimpleMetadataReader and CachingMetadataReaderFactory to decide how
meta-data read log messages should be handled.
Suppress metadata log messages on @Conditional

Update ConfigurationClassParser to suppress metadata read log messages
for @Conditional @Configuration classes when not loaded.
Make SpringFactoriesLoader.loadFactoryNames public

Update the SpringFactoriesLoader static loadFactoryNames method from
private to public.
Add AnnotationConfigApplicationContext constructor

Add AnnotationConfigApplicationContext constructor allow use of a
custom DefaultListableBeanFactory.
Support *Aware ImportSelectors

Implementations of Spring's ImportSelector interface may
now implement any of the following *Aware interfaces and have their
respective methods called prior to #registerBeanDefinitions:

 - BeanFactoryAware
 - BeanClassLoaderAware
 - ResourceLoaderAware
Add support for DeferredImportSelector

Add DeferredImportSelector interface that can be used to select imports
after all @Configuration beans have been processed.
Filter source @Configuration with @ComponentScan

Exclude self @Component when parsing @ComponentScan annotations.
Consider @Import classes as lite @Configuration

Allow classes that are annotated with @Import to be considered as 'lite'
@Configuration candidates. Allows the AnnotationConfigApplicationContext
to directly register @Import beans even if they are not @Components.
Add AsyncUtils

** Probably not for Spring 4 M1 **
Cache uniqueDeclaredMethods

** Probably not for Spring 4 M1 **
Reduce memory on RBD merge

** Probably not for Spring 4 M1 **
Support for embedded servlet containers

** Probably not for Spring 4 M1 **

FIXME: Restore code from bootstrap project

Develop new EmbeddedWebApplicationContext (along with XML and
@Configuration variants) that creates and controls an embedded servlet
container. Unlike the traditional approach where a ContextLoaderListener
bootstraps Spring and creates a new WebApplicationContext, embedded
support expects that the EmbeddedWebApplicationContext will be created
directly.

The EmbeddedWebApplicationContext will become aware of a ServletContext
once the embedded container has been started. This will happen early,
allowing regular beans to call the getServletContext() method or
implement ServletContextAware.

The EmbeddedServletContainerFactory and EmbeddedServletContainer
interfaces provide a simple abstraction for creating, starting and
stopping the container. Any embedded container that supports Servlet
3.0+ initialization can be adapted. Implementations for Tomcat and
Jetty are provided.

The FrameworkServlet (and hence the DispatcherServlet subclass) is
now ApplicationContextAware. This allows FrameworkServlets to be
defined and used as Spring beans within the
EmbeddedWebApplicationContext.

Issue: SPR-10381