AMQP-330: fix JavaTypeMapper JsonArray conversion

Since `JsonMessageConverter` (`Jackson2JsonMessageConverter`) uses
`JavaTypeMapper`(`Jackson2JavaTypeMapper`) it should correctly do
a conversion around simple Java and arrays (`String[]`) too.
Seeing Jackson's `ArrayType` is **ContainerType**, erenow `JavaTypeMapper`
implementation added to `Properties` '__ContentTypeId__' header
on `toMessage` call and tried to create a collection (not array) from that header
on `fromMessage` call.

Add checks that provided **ContainerType** is (not is) **ArrayType**

JIRA: https://jira.springsource.org/browse/AMQP-330
AMQP-332 Fix Multiple Listeners with Id

Previously, if the parent <listener-container/> element
was given an Id, and multiple <listener/> elements existed
only one listener container bean was defined - the parent
element Id was used for the bean name.

- Use the child element id if present
- Disallow multiple child elements with the same id
- If a single child element has no id, use the parent
- If multiple elements with the same id exist, use the parent id + '#n'.

Polishing

The anonymous parent case didn't work. Since the generated
bean name was never registered, two or more anonymous listener-container
elements got the same generated name, causing collisions.

Generate the anonymous name internally.

For the test case, reset the instance variable for each test.

JIRA: https://jira.springsource.org/browse/AMQP-332
AMQP-290 Fix Exch. and Queue Argument refs

Fix AMQP-290. Add the correct reference contructor to the parser, so
exchange or queue arguments can reference a map.

Add test cases for exchanges and queues.

Add more Tests for AMQP-290

Polishing; formatting; add error if both ref and nested.
 - fix queue placeholder tests
AMQP-335: Add checkTestConfigs Gradle task

* Fix configs vulnerabilities

JIRA: https://jira.springsource.org/browse/AMQP-335
AMQP-336 Rule to Skip Long Integration Tests

Skip on normal builds; set up a nightly plan to run with all.

Reduced build time from 15 mins to 2.
AMQP-241 Add package-info Files; Use SPR css
Add TestUtils from SI
AMQP-338 Fix Listener Container Stop

Previously, when stopping the listener container, the consumer threads
kept consuming messages and were eventually killed after the `shutdownTimeout`
by forcing the channel closed.

The problem was due to the `receiveAndExecute` method always returned true while
messages exist (called within a loop from AsyncMessageProcessingConsumer.run().

https://jira.springsource.org/browse/AMQP-338

Add code to suspend the client delivery thread during shutdown to prevent delivery
of new messages, while allowing the consumer thread to drain the messages already
in the prefetch queue. When the queue is drained, the method returns false, causing
the loop to exit. Subsequently, consumer.stop() is called, which releases the
delivery thread and closes the channel.

Add a test case to reproduce the problem (more than prefetch messages delivered after
stop()) and verify it is corrected with this change.

It is important to understand that if AcknowledgeMode.NONE is employed, one message
may be lost for each consumer when the container is stopped.

AMQP-338 Polishing

Reinstate cancelled.set(true) for cases where stop() is called
after a consumer thread exception (restart or abort).
AMQP-339 Support Build with SPR 4.0.0

- Add refresh() to test GenericContexts
- Remove commons.lang NotImplementedException

Also increase timer in a test case.

JIRA: https://jira.springsource.org/browse/AMQP-339
INT-334 Doc for Spring Retry 1.0.3

JIRA: https://jira.springsource.org/browse/AMQP-334
AMQP-341: Add logic for System 'line.separator'

JIRA: https://jira.springsource.org/browse/AMQP-341
AMQP-340 Fatal on RabbitMQ Authentication Failure

Consider RabbitMQ authentication failure as FatalListenerStartupException in order to abort further connection attempts
* add `PossibleAuthenticationFailureException` to the list of exceptions being converted in `RabbitExceptionTranslator`
* add unit test for `RabbitExceptionTranslator`

JIRA: https://jira.springsource.org/browse/AMQP-340

Based on original work by Sergey Shcherbakov <sshcherbakov@gopivotal.com>

AMQP-340 Polishing

Introduce AmqpAuthenticationException wrapper to avoid getting
a listener exception when not using a listener.
AMQP-337 Emit Closed Event on All Closes

Previously the ConnectionListener.onClose() was only called
when the connection factory was destroyed, and not when a
closed connection is refreshed.

Also, the onClose() in destroy passed in the target connection
instead of the proxy (which is what is passed to onOpen().

JIRA: https://jira.springsource.org/browse/AMQP-337
AMQP-306 Dynamic Consumers

JIRA: https://jira.springsource.org/browse/AMQP-306

- Allow the concurrentConsumers to be modified on a running container
-- add or remove consumers as necessary
- Add maxConcurrentConsumers
-- New consumer started at the max rate of 1 every 10 seconds and only if another consumer processes 10 consecutive messages
-- Idle consumer stopped if 60 consecutive timeouts (default 1 second each) no more than one consumer stopped per minute

INT-306 Polishing; Namespace; Docs

- PR comments
- Add Configurable Start/Stop Algorithm Properties
- Namespace Support
- Docs

Also:

Add `receive-timeout` to namespace.

JIRA: https://jira.springsource.org/browse/AMQP-264

AMQP-306 Polishing

PR Comments