Electron cyclotron resonance heating in tandem-mirror end cells