ISPN-263 Handle cluster partitions

https://issues.jboss.org/browse/ISPN-263

I added one more commit with some test fixes.
TBH I don't think this should be public API (at least for now). I'm moving it to the impl package.