Canonical Subproblems for Robot Inverse Kinematics