Rewrite special functions to use pycuda's ElementwiseKernel and memoization.
Update CHANGES.