Use FFTW plan interface

By my calculations, this is about twice as fast
Tweak some tests

Fix typos and add checks for odd numbers of samples and integer
arguments