Electron and phonon thermal waves in semiconductors: the effect of carrier diffusion and recombination on the photoacoustic signal