ISPN-263 Handle cluster partitions

https://issues.jboss.org/browse/ISPN-263

I added one more commit with some test fixes.
it worries me more that these synchronizations are not documented.
Do they all need to have the same lock? What about the private methods in the class, are we assuming some locks must be owned before they can be invoked?
And some private methods are synchronized too, looks like deadlocks are totally possible.