Resilient k-d trees: k-means in space revisited