MODE-2353 Fixed the Infinispan tx listener in case multiple writer threads are active

Then if it's theoretically possible that ISPN might call these methods more than once, then the implementation needs to do more than just ensure synchronized access to the methods: it needs to ensure the methods have an effect only once, the first time each method is called.