MODE-2343 Added more robust handling when shutting down the repository change bus.
Merge pull request #1311 from hchiorean/MODE-2343

MODE-2343 Added more robust handling when shutting down the repository change bus.
MODE-2364-3.x Changed the way the Infinspan listener approach is used when dealing with user transactions: instead of multiple listeners (which doesn't really scale), this approach uses 1 listener instance to handle all the different threads (transactions) and leverages the fact that we're using a ThreadLocal to store the active ModeShape transaction. Therefore, when notified, the listener should be able to tell if it's being notified for the tx associated with the current thread or not.