Clean up quadrule extension module.

Allocate the output arrays within the extension, don't pass in mangled ctypes
pointers.