Fix major bug in riemanntheta_cy.

There is a bug specific to OSX (clang?) where pointers /
memory buffers were not being dealt with correctly when
delegating the Riemann theta computation to C code.
This is now resolved.