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

Add unit test
Cleanup