Electron-spin polarization by resonant tunneling