ELECTRON ACCELERATION BY CASCADING RECONNECTION IN THE SOLAR CORONA. I. MAGNETIC GRADIENT AND CURVATURE DRIFT EFFECTS