Added log_diff_exp: math, gradients, tests and doc