Stochastic Ion Acceleration by the Ion-cyclotron Instability in a Growing Magnetic Field