Refined tests for FactoryBean return type resolution on @Bean methods

Issue: SPR-11842
Polishing
Reference documentation consistently refers to Apache HttpComponents instead of outdated Commons HttpClient

Includes overhaul of remaining references to J2SE and J2EE, consistently replacing them with "the JDK" and "Java EE".

Issue: SPR-11853
Polish assertions and Javadoc for ResourceDatabasePopulator
Polish ModelFactory
Add dependency ordering for @ModelAttribute methods

Before this change @ModelAttribute methods were not invoked in any
particular order other than ensuring global @ControllerAdvice methods
are called first and local @Controller methods second.

This change introduces a simple algorithm that selects the next
@ModelAttribute method to invoke by making a pass over all methods and
looking for one that has no dependencies (i.e. @ModelAttribute
input arguments) or has all dependencies resolved (i.e. available in
the model). The process is repeated until no more @ModelAttribute
methods remain.

If the next @ModelAttribute method cannot be determined because all
remaining methods have unresolved dependencies, the first available
method is picked anyway just as before, i.e. with required
dependencies created through the default constructor.

Examples in ModelFactoryOrderingTests.

Issue: SPR-6299
Add JSONP support to MappingJackson2JsonView

Enable JSONP support by wrapping the JSON output into
a callback when a JSONP query parameter specifying the
function name to use as callback is detected.

Default query parameter names recognized as JSONP ones
are "jsonp" and "callback". This list can be customized if
needed.

This commit also fixes JSONView support by removing
the view name specified in the model from the output.

Issue: SPR-8346
Polish MappingJackson2JsonView
Allow custom UrlPathHelper for WebSocket requests

Issue: SPR-117711
Using SmartLifecycle to register MBeans

Prior to this commit, MBeans were registered in a post construct
call of MBeanExporter. This commit moves that logic after the
initialization phase using the SmartLifecycle callback.

Issue: SPR-8045
polishing

Reorganized class structure to match our code style (setter for
properties at the top of the class, public method before private
implementation).

Removed DisposableBean as it the lifecycle is already taking care
of removing MBeans on stop.

Cleaned test suite

Issue: SPR-8045
Merge pull request #551 from mdeinum/SPR-8045

* SPR-8045:
  polishing
  Using SmartLifecycle to register MBeans
Fix callout formatting issue
Support Groovy Markup templating in Spring MVC

This commit adds support for Groovy templating, available as of
Groovy 2.3.1.

To enable this, one should create a new GroovyMarkupViewResolver
and a new GroovyMarkupConfigurer Beans in their application context.

    // Add that bean definition in a @Configuration class
    @Bean
    public GroovyMarkupConfig groovyMarkupConfigurer() {

      GroovyMarkupConfigurer configurer = new GroovyMarkupConfigurer();
      configurer.setResourceLoaderPath("classpath:/WEB-INF/groovymarkup/");
      return configurer;
    }

Issue: SPR-11789