Impulsive Control Systems : Dynamics, Optimization Problems, and Applications to Mechanics