Determination of beam-foil lifetimes <100 ps with a grazing-incidence spectrometer