Fix bugs in inverse FFT normalisation
This PR fixes bugs in the IFFT normalisation noted in #1727 (closed), and improves the testing to assert that data.fft().ifft()
returns the same array (within precision) for a few simple cases.
Closes #1727 (closed).