Robotic Joint-Motion Optimization of Functionally-Redundant Tasks