Fixed memory leaks in cumsum and cumprod.

When calling PyArray_CumSum/PyArray_CumProd of the Numpy's C-API with an out parameter, it will create and return a new reference on the result array. To avoid memory leak, Py_XDECREF should be used after calling those functions.

Initially, I thought it was a bug, but it seems not: http://github.com/numpy/numpy/issues/4312