Electron-Ion Collisions in the Average-Configuration Distorted-Wave Approximation