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.
handle float32 input correctly

When presented with a float32 input, the library should perform a 32-bit
single precision transform and not a full double-precision one.  Add
test cases for float32 and make the transform library pass.