General theory of radiative corrections to atomic decay rates