Add support to calculate analytical derivative of ifelse function

I have added a few lines to differentiate.jl in order to support analytical differentiation of the ifelse function which can be used to define piecewise functions. It simply returns a new ifelse function with the derivative of the second and third arguments and it also works with nested ifelse. 

It does not check whether the piecewise function is differentiable and continuous (it is up to the user to make sure that is the case).
Please use an in-line expression instead of ``parse``, e.g.,
```
:(ifelse($(args[1]), $(differentiate(args[2],wrt)),$(differentiate(args[3],wrt))))
```