INT-2993: JCMStore: fix 'idCache' race condition

Previously there was a concurrency race condition, where
`parameters` with `idCache` for poll Messages query had one state on building phase,
but had another one on execution phase.

* Introduce `ReentrantReadWriteLock` `idCacheLock` for operation around `idCache`
* Change `idCache` to simple `HashSet`, because thread-safety is guaranteed by `idCacheLock`
* Add a concurrency test-case, which failed before fix

JIRA: https://jira.springsource.org/browse/INT-2993
Merge pull request #815 from artembilan/INT-2993

* artembilan-INT-2993:
  INT-2993: JCMStore: fix 'idCache' race condition