Added the cumsum function similar to numpy's one.
Removed forgotten debug comments.
Added a C version for the CumsumOp.
Changed PyArray_SHAPE to PyArray_DIMS.
Reuse allocated memory when possible.
Implemented cumprod function similar to numpy's one.
Simplify unit tests using check_preallocated_output
Remove check_preallocated_output and use default mode for theano.function.
Merge pull request #1700 from MarcCote/cumsum

Added the cumsum and cumprod functions similar to numpy's ones.