Mechanics and control of swimming: a review