Stability of periodic paraxial optical systems