Electron orbits and stability in realizable and unrealizable wigglers of free-electron lasers