Ideal Kerker scattering by homogeneous spheres: the role of gain or loss