Fix compilation warning.
Add a method to test interaction between two joints.

  Keep track of pairs of joints that are tested for collision and distance.