Support for java.util.Optional within ObjectFactory/Provider

Includes support for arbitrary deep nesting levels in DependencyDescriptor's getDependencyType() and MethodParameter's getNestedParameterType().

Issue: SPR-11833
Update Javadoc on SockJS client library URL

Issue: SPR-11766
Improve no content handling in MockHttpServletRequest

Issue: SPR-11764
Fix issue with RequestBody(required=true)

Issue: SPR-11828
AbstractAutowireCapableBeanFactory's getTypeForFactoryBean considers FactoryBean<Object> declarations as non-indicative (just like raw declarations)

Issue: SPR-11842
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
Fix typo

Issue: SPR-11862
Add Spring View support for Groovy Markup Templates

This commit adds support for Groovy Markup templates.
Spring's support requires Groovy 2.3.1+.

To use it, simply create a GroovyMarkupConfigurer and a
GroovyMarkupViewResolver beans in the web application context.

Issue: SPR-11789