ISPN-1174 Fix async cache store consistency issues with some operations

* This fix addresses issues related to interaction between remove,
eviction (with and without passivation) and async cache store, making
sure that the cache returns consistent information.
* To build unit tests I've had to patch internal cache components to
behave in a particular way, which has lead me to converting the
component metadata repository to a non-static class. This helps
enormously in building such unit tests without having to change
existing components.
fixed compilation issue
ISPN-2306 Remove the code that resends PrepareCommands

* Remove CommitCommand.RESEND_PREPARE and all the logic related to it from DistributionInterceptor, VersionedDistributionInterceptor, ReplicationInterceptor and VersionedReplicationInterceptor
* Remove unused methods: PrepareCommand.existModifications(), PrepareCommand.getModificationsCount(), PrepareCommand.containsModificationType()
* Remove unused method RemoteTransaction.isMissingModifications(). All remote transactions have their 'modifications' correctly populated by new NBST
* Add RemoteTransaction.isMissingLookedUpEntries() flag. This flag is true for all transactions received via NBST. Modify StateTransferInterceptor to create and execute a PrepareCommand if a CommitCommand is received and RemoteTransaction.isMissingLookedUpEntries() is true; this approach does not require resend of PrepareCommands
ISPN-2249 Fix and re-enable HotRod tests that were failing because of NBST

HotRodTestingUtil was duplicating the server logic in order to compare
the ownership, but it didn't work properly.

The others were intermittent failures that I believe were fixed with
ISPN-2262.
ISPN-2295 Inject the running Cache in the PreExecute context for Reducer operations
ISPN-2294 Duplicate index entries when using the Infinispan IndexManager query backend
ISPN-1440 Rebuild the indexes in batch from the data
ISPN-1440 Make sure distributed indexing can work on non-Serializable keys
ISPN-2321 Memory leak in CacheStoreInterceptor (cache with LockingMode.PESSIMISTIC)
Avoid/ignore InterruptedExceptions when handling the last view before shutdown
ISPN-2249 GroupsChFunctionalTest was not checking key ownership properly

It was stopping a cache and then asking the same cache if it owned a key.
JBQA-6620 -rm REMOVE_DATA_ON_STOP flag test
ISPN-2329 TableManipulation.getDatabasetype does not release used connections
ISPN-2325 Fix the JMX domain conflict failing tests

* Convert tests to using test cache manager factory.
* Solve issues related to cache managers not being closed.
* Create alternative cache manager factories for CDI and Spring tests.
ISPN-2312 TransactionTable does not compute minViewId correctly after NBST was introduced

To fix this we need to ensure that transferred transactions have the correct topologyId.

* Add topologyId to TransactionInfo, populate it accordingly in StateProviderImpl
* Add TopologyChangedEvent.getNewTopologyId()
* Rename DataRehashedEvent.getNewViewId() to DataRehashedEvent.getNewTopologyId()
* StateProviderImpl does not transfer transactions that do not have any locks on keys belonging to the destination node (just an optimisation)
* Remove unused method TransactionTable.removeLocalTransaction() and XaTransactionTable.removeLocalTransaction()
* StaleTransactionCleanupService now listens for topology change events rather than JGroups view events
* In StaleTransactionCleanupService.onTopologyChange we release locks for which we are no longer an owner only if the cache is distributed
* TransactionTable is now a synchronous topology change listener instead of listening for JGroups view events
* AbstractTxLockingInterceptor.lockKeyAndCheckOwnership uses non-strict topologyId comparison if the current topology has the same id as the previous one. This is indicated by the newly added TransactionTable.isStrictComparison()
* Enable MainOwnerChangesLockTest as it is working now
* Enable LockOwnerCrashPessimisticTest as it is working now
* Fix MinViewIdCalculusTest which was wrongly asserting based on JGroups Transport viewId rather than CacheTopology topologyId.
Replace 'assert false' with Assert.fail()
Solve minor generics warning in AbstractInfinispanTest.fork().
ISPN-2271 removed deprecated api usage in tests
ISPN-1822 - Do not extend LinkedHashMap in LRU eviction strategy
ISPN-2296 Queries are ignoring Projection option