Fix broken script tests

Options Ordering: restore ENV.
Fix tail options.
XD-1406 Upgrade groovy

-Upgraded groovy `testCompile` dependency to `2.2.2`
Fix JobExecutionListener support

- Add all the available JobExecution listeners to the
  batch job module being loaded.

This will make sure to add the built-in job execution listener
as well as the custom job execution listener if added in the batch
job configuration.

- Fix the jdbc_tests script to use the correct tap channel
  to receive notifications
XD-1343 Added XD extension mechanism

changes per review comments

replaced META_INF with META-INF

supports multiple base packages and locations
Fix NPE in ExtensionsTests
XD-1396 Fix ContainerRegistrar event handler

The ContainerRegistrar should only process the ContextRefreshedEvent from
the ContainerServerApplication's context refresh event. When an external
management server used, then its context refresh also triggers the
ContainerStartedEvent.
 - Fix ContainerRegistrar's event handler to process the event's source
applicaton context ID equals to that of containerID from ContainerMetadata.
Clear system property in tearDown if not originally set.
Fix SingleNode container started event

- Check if the context is not management context instead of checking if the context id is
container id as single node application will have a different id
XD-1378: Add HttpClientProcessorOptionsMetadata
XD-1401 Add reactor-tcp Source and Througput Sink

Added reactor-tcp source module definition. Updated NetServer configuration to use individual properties that can be referenced from the CLI using OptionsMetadata.

Also addresses XD-1407 by adding a simple ThroughputSamplerMessageHandler that counts messages and reports throughput by recognizing demarcation/control messages. The message payloads are configurable but the default is to count messages between START and END messages.
Refactor imap into mail source
Creations options for mail sink
Make ContainerRegistrar ApplicationContextAware

- Fire ContainerStartedEvent only if the application context is
the Container context
Fix script tests

- Fix script tests to use loopback address instead of localhost
Update Spring-AMQP to 1.3.0.RC1
Fix jobLaunch controller name
XD-1378c Add extension-http depencency to http-client module

Also reverts the addition to the xd-dirt testRuntime deps, which
is not the correct way to go.
Creating one xd-yarn shell script to replace the xd-install, xd-admin and xd-container ones

- Available command options are:

  - xd-yarn -p <PATH_TO_DIRECTORY_FOR_APP_ARTIFACTS> push

  - xd-yarn start admin

  - xd-yarn start container

- the push command creates a manifest.yml in the current directory or it can be directed to specific location using -f <PATH_TO_DIRECTORY_FOR_APP_ARTIFACTS>. Instead of -p we can use --path and instead of -f we can use --manifest.
XD-1378: Add options for metrics modules

* Changed all modules to be directory based, as it reads nicer when
  looking for the sibling .properties file
* Renamed metrics related stuff to always use dashes
* Harmonized metrics names to be named "name" :)
Fix tweet_tests

Need to use "name" instead of "counterName" following
recent changes.