Theory of current-induced spin polarization in an electron gas