Periodic geodesics for contact sub-Riemannian 3D manifolds