Added multi-threading to the particle linkage algorithm.