Fixed concurency issue #268 in MemoryCache

 * Added synchronization on critical sections
 * Added test case for getAndTag in concurrent environment