Vector exp, log and cumprod.

- Rewritten cumsum in terms of a general cumulative reduce, and added cumprod. 
- Added exp and log to linear algebra functions.