Refactor approach computation internals.

Planning group selection has been improved to select groups that:

- Span at least the joint of the input motion that change between current and
  goal configurations.

- Span at most all joints of the input motion.