ISPN-2405 Pessimistic transactions can leak locks when cluster topology changes

* In PessimisticLockingInterceptor.visitLockControlCommand there is an optimization to avoid remote calls if the key is local. Unfortunatelly this had the unintended side effect of not adding the locked key to TX.afectedKeys collection if the key was local which resulted in the key not being unlocked on TX end.

* BaseRpcInterceptor.shouldInvokeRemoteTxCommand() and AbstractEnlistmentAdapter.mayHaveRemoteLocks will return true if the TX was started in an older topology than current, regardless if modifications or remote locks are present. This ensures the TX command reaches all locked key owners not just the ones registered in TX.getRemoteLocksAcquired() which can become out of date after rehashing.

* RpcManagerImpl.getTopologyId() should return -1 instead of throwing NPE if the cache has not joined yet (ie. during preloading)

* Add unit test for the pessimistic locking case.

* Minor cleanup in the existing UT for optimistic locking.
ISPN-2366 Rename state transfer config option 'waitForInitialStateTransferToComplete' to 'awaitInitialTransfer'

* The previous name was not choosen well.

* Revised javadoc and XSD documentation for this config option to higlight the consequences of turning it off.
ISPN-2578 Two PrepareCommands in parallel cause ConcurrentModificationException
ISPN-2728 AbstractCacheTransaction.hasLockOrIsLockBackup may cause NPE
- temporary fix
ISPN-2420 Increment the topology id when a node leaves the cache

Needed for the ISPN-2632 fix with replicated caches - since they don't
rebalance after a leave, they will never send a topology update to their
clients.
ISPN-2632 Uneven request balancing after node crash

Send the cache topology id to the client instead of the JGroups view id.
After a rebalance, the cache topology id is incremented, so this ensures
that the client's topology information is updated as well.
ISPN-2731: Fixed NPE that can occur on a null response.
ISPN-2421 Optimise the call to LocalTransaction.getCommitNodes

* If the topology id has not changed LocalTransaction.getCommitNodes will return the unchanged list of recipients.
* TransactionTable.useStrictTopologyIdComparison is no longer required since the topology id is incremented on each update. All usages in AbstractTxLockingInterceptor need to be removed also.
ISPN-2596 Create unit test for ISPN-2574

Add StateTransferRestartTest that highlights ISPN-2574 regression issue, contributed by Michal Linhard.
ISPN-2574 Segment transfer not restarted if the owner fails

* The already in-progress inbound task that was fetching from a leaver should have been cancelled before being retried. The existing code already took care of removing the old task and creating a new one but it should have also removed it from taskQueue and interrupt the task in order to unblock the transfer thread. InboundTransferTask.terminate() method was added for this.

* The logic that prevents two transfer threads running at the same time is broken and could also result in no thread running at all if the existing thread was about to exit but did not set isTransferThreadRunning to false yet. This means not all tasks in taskQueue were always processed.
ISPN-2579 StateResponseCommand received after the node is removed from CH causes IllegalArgumentException

Must check if we are still member in write CH before applying state in order to prevent failures if a late StateResponseCommand is received during leave.
ISPN-2733 Issue with the release script (bin/release.py)
ISPN-2507 @DataRehashed event is not triggered

I fixed ISPN-2401 as well, because it needed the same approach as notifying
the listeners of the start and end of rebalancing at the right time.

I added the consistent hash to the DataRehashedEvent, which should be
backwards compatible, because user code is not supposed to implement it.
ISPN-2740 NPE at AbstractEnlistmentAdapter

The NPE was caused by null rpcManager in local mode during execution of removeTransactionInfoRemotely(). Actually, removeTransactionInfoRemotely() should only execute if the cache is clustered. The already existing isClustered() check was using logic short-circuiting and was miss-placed, so I moved it outside the method.
ISPN-2742 Log Infinispan version information from Hot Rod client
ISPN-2747 Drop Woodstox dependencies
ISPN-2714 - org.infinispan.distexec.mapreduce.TopologyAwareTwoNodesMapReduceTest.testInvokeMapperCancellation test fails randomly
ISPN-2581 StateTransferManagerImpl.waitForInitialStateTransferToComplete() returns too soon

Don't flag the initial state transfer as complete as soon as we send the
rebalance confirmation to the coordinator. It will be flagged while
processing the next topology update.
ISPN-2736 ConcurrentModificationException in StateRequestCommand

The lock collections are already synchronized so all we need to do is to add synchronization on them around the iteration.
ISPN-2739 Document the encoding command correctly