Make the DistanceBasedAlgorithm thread-safe (item adds + clustering)