On the behavior of periodic solutions of planar autonomous Hamiltonian systems with multivalued periodic perturbations