Fixed foreign version so that cufftPlan* is not called every time the AST is evaluated.

- Importantly, the plan is now no longer destroyed properly. We need to attach a finaliser.