Tidy up locking usage around FFTW.

* Move QMutex into the class instead of static.
* Use QMutexLocker
* Only lock around FFTW plan & destroy functions.