Stochastic model of electron-cyclotron heating in a magnetic mirror