Scattering and energization by large-amplitude whistler-mode waves in the evolution of solar wind electron distributions and Hamiltonian analysis of resonant interactions