A mathematical model for current oscillations at the active-passive transition in metal electrodissolution