Chaotic Solutions in Slowly Varying Perturbations of Hamiltonian Systems with Applications to Shallow Water Sloshing