The time-harmonic eddy-current problem in general domains: solvability via scalar potentials