Implemented parallel versions of contact and distance processing functions
previously implemented in Numba.