[gfs] Fix a bug in Fourier transforms

With time points both at the beginning and at the end one must be careful
to manually reweight the first point in the time sum and add the last
point in order to make sure no symmetry gets broken. Added a simple test.