Add (de)serializerByType() and mixIn() to Jackson2ObjectMapperBuilder

Issue: SPR-12313
Add Vary:Origin HTTP header in SockJS responses

This change adds a "Vary: Origin" HTTP response header for /info and
/iframe SockJS endpoints.
This is preventing proxies and browsers from caching a response and
reusing it for an invalid Origin.

Reference: https://groups.google.com/forum/#!topic/sockjs/svsLWRorSis

Issue: SPR-12310
SockJs client: add an XhrTransport for Undertow

This change adds a new XhrTransport for the SockJs client
implementation. This transport is based on `UndertowClient`,
Undertow's HTTP client.

Note that this transport can be customized with an OptionMap that is
used by the Xnio worker backing the I/O communications (see
http://xnio.jboss.org).

Implementation tested with undertow 1.0.36, 1.1.0.RC3, 1.2.0.Beta1.

Issue: SPR-12008
Polish indentation
Allow binary messages in StompSubProtocolHandler

Issue: SPR-12301
Add option to copy HTTP session id to handshake attrs

Issue: SPR-12314
Allow plugging in a WebSocketHandlerDecorator

The WebSocketMessageBroker config now allows wrapping the
SubProtocolWebSocketHandler to enable advanced use cases that may
require access to the underlying WebSocketSession.

Issue: SPR-12314
ResponseEntity's HeadersBuilder allows for specifying existing HttpHeaders

Issue: SPR-12324
Polishing
Delete unused imports in spring-messaging module
Delete unused imports in spring-websocket module
Add interceptor to resourceHandlerMapping

The resourceHandlerMapping in the MVC Java config is not configured
with any interceptors, and in particular those added through the
InterceptorRegistry, which are otherwise added to all other handler
mapping beans created by the config. This means that the
ResourceUrlProviderExposingInterceptor (added in 4.0) is also not
used for resource requests.

This change ensures the ResourceUrlProviderExposingInterceptor is
configured on the resourceHandlerMapping.

Issue: SPR-12279
Consistently accept empty Content-Type header and empty character encoding

Issue: SPR-12173
Polishing
EclipseLinkJpaDialect passes custom isolation level on to EclipseLink's DatabaseLogin configuration

Issue: SPR-12319
Improve HttpSessionHandshakeInterceptor

Use explicit flag whether to copy all attributes.
Check for duplicate keys in YAML map nodes

Snake YAML allows for duplicate keys in map nodes. See
https://code.google.com/p/snakeyaml/issues/detail?id=199

This commit uses a dedicated Constructor extension that explicitly
checks for such duplicate keys.

Issue: SPR-12318
Polish resource handling tests
Prepend leading slash in ResourceUrlProvider

The getForRequestUrl method of ResourceUrlProvider uses the
HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE attribute to
determine the relevant portion of the resource URL path.

However there are cases when that attribute may not have a leading
(e.g. when the current URL was matched to a prefix-based pattern
and hence extracted via PathMatcher#extractPathWithinPattern), which
interferes with the matching of resource URL paths to patterns.

This change ensures a leading slash is present

Issue: SPR-12281
Proper JCache metadata caching on non cache methods

Prior to this commit, the cache operation metadata cache was not
updated for a method not using the JCache annotations. This means
that every execution of said method was going through the process
of identifying if it was using the cache or not.

This commit adds a default placeholder identifying the absence of
metadata; this allows to flag such method as not having any metadata
at all.

Issue: SPR-12337