Origin of odd-even staggering in fragment yields: Impact of nuclear pairing and shell structure on the particle-emission threshold energy