Batch 1752

Included two possible fixes and a sample unit test for one of the class to implement a stateful counting jms reader. This is for the following jira:
https://jira.springsource.org/browse/BATCH-1752