Integrated photodetectors for compact Fourier-transform waveguide spectrometers