Synthesizing Grasps and Regrasps for Complex Manipulation Tasks