Influence of the core-valence interaction and of the pseudopotential approximation on the electron self-energy in semiconductors