Hamiltonian perturbation theory: periodic orbits, resonances and intermittency