Development and tests of a simple multifoil spectrometer for highly time-resolved line intensity measurements in the RFX experiment