ISPN-4626 Race condition in the LocalEntryRetriever between iterator() a...

...nd hasNext()

https://issues.jboss.org/browse/ISPN-4626
The case is, in a foreach loop involving the entryRetriever, iterator() and hasNext() are called implicitly one after another. The iterator construction schedules a thread to start iterating through the data container entries, and sometimes it gets delayed, so a call to hasNext returns false and the client code fails, since the foreach loop is never  executed.