Added multi-threading to the closest-pair based algorithms