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.