Canonical transformations to action and angle variables and their representation in quantum mechanics IV. Periodic potentials