XD-1291 Graceful container shutdown

- When the container shuts down, there are following application
contexts:
 - (1) ParentConfiguration global context
 - (2) LauncherApplication context whose parent is (1)
 - (3) Common context (from module common)
 - (4) Deployed modules contexts whose parent is (3)

With Boot RC3, the shutdown hook is registered only on (1)
and all the child contexts are subsequently closed using
ParentContextCloserApplicationListener.

This PR addresses the order in which the modules contexts are
closed by making sure the consumer modules (sink/processor) get
closed before the producer modules (if all are deployed inside
a same container).

- ModuleDeployer, during its destroy() will only publish the module
undeployment events as the modules contexts and the common context are closed
appropriately before the ModuleDeployer is destroyed.
XD-1291 Change precedence order

- The producer modules context should be closed before
the consumer modules context.
XD-647: Enable text/plain conversion on byte[] payload
Fix generics warning
XD-1351 Replace Plugin.preprocessSharedContext

- replaced Plugin.preprocessSharedContext with ApplicationListener

- removed duplicate codec bean

- module-common.xml comment and dup method in TestStreamPlugin
XD-1209 external config support for Windows

- Fix xd batch scripts to pass XD_CONFIG as the jvm arg
by setting `spring.config.location`
  - made sure the `file:` URL prefix is added to XD_CONFIG
  - Handle double quotes appropriately. If an environment variable
    has space in it, it is expected to receive the variable in
    double quotes.
XD-1354

Removed XDContainer.

Added ContainerMetadata for use in container events.
(will likely be replaced with the domain model we design for the upcoming ZooKeeper-based runtime update)

Renamed LauncherApplication to ContainerServerApplication.

Moved config location constants to a new ConfigLocations class within the util package.

Updated scripts to use ContainerServerApplication.