Speed up, zeros_like is slow

np.zeros_like is slow shen the input is not an ndarray, perhaps it is
converted internally? We use np.empty() explicitly which is much faster.
Speed up, use leastsq instead of dot & pinv
Convert s to tuple to circumvent pyFFTW caching bug

There is a bug in pyFFTW 0.9.0 that caches too much, causing memory
leak. See https://github.com/hgomersall/pyFFTW/issues/22
Re-use PyFFTW after working around cache memleak

See https://github.com/hgomersall/pyFFTW/issues/22 for details. Casting
argument s to a tuple solves this.