ISPN-3389: Account for the new lock owner for any local transactions to prevent the tx from being stale in the new owner's tx table.

https://issues.jboss.org/browse/ISPN-3389
Replacing https://github.com/infinispan/infinispan/pull/1998

Erik's fix + a unit test + some other small fixes.