Text this: Reconstruction of x-ray free-electron laser pulse duration and energy chirp from spectral intensity fluctuations