A geometric theory of swimming: Purcell's swimmer and its symmetrized cousin