add tougher tolerance for perfect reconstruction test
general tidyups of 2d transform code
fix perfect reconstruction for 2D

The 2D transform was hard-coded to only ever return 64-bit complex
(i.e. two 32-bit floating point part) results. Modify it to select a
complex data type depending on the input. Fixes #9.
Merge pull request #11 from rjw57/2d-perfect-recon

choose output type appropriate for input in 2d transform