Fermi and betatron acceleration of suprathermal electrons behind dipolarization fronts