Refactor whole-body constraints definition in one method.

  * Foot and CoM constraints are defined outside this method when
    adding step elements.
  * Whole-body constraints are added to the generic task when
    animating parts of the solution path, and when animating the whole
    path.