Rearchitecturing hierarchical clustering

Merge strategies are introduced and Hierarchical clusterer simply
passes the documents to the merge strategy and iteratively calls
getNextMerge() untill only one cluster remains.

Complexity of single_link, complete_link and group_average
is also changed from O(n^3) to O(n^2*logn).

TODO: add better tests, especially for group_average