Replace k-medoids with Park & Jun's algorithm

This is much faster than the PAM algorithm used previously:
 - time complexity is O(nk) versus O(k(n-k)^2)
 - in our tests, it was 7x faster with a 500-object dataset, and >50x
   faster with a 10,000-object dataset

It also does not suffer from the bug in the previous implementation that
occasionally produced several clusters with the same medoid.