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

Added unit test
Cleanup