Optional arguments in log_sum_exp().

Allow for different implementations of log and exp.  Useful with numpy; use np.log and np.exp to operate elementwise on array-likes.