Tranpose all matrices and do loops the other way

This still uses the fastest index first as before, but allows us to get rid of the `fac` array. Also we got rid of the ugly `reshape(dft_vec(reshape(x, [Nmin, Ns], order=[2, 1])), [N])` line. The speedup is about 1.3x.