Improving clustering and some steps towards HSEARCH-882


This contains HSEARCH-1388 and some steps needed as pre-requisite for HSEARCH-882.
Please don't mark HSEARCH-882 as resolved, the most interesting part will come later: this pull is meant to keep the next one a bit simpler (as it's quite complex).

 - https://hibernate.atlassian.net/browse/HSEARCH-1388
 - https://hibernate.atlassian.net/browse/HSEARCH-882