Resonant Modal Interactions and Adiabatic Invariance for a Nonlinear Wave Equation in a Variable Domain