update function signature of d1 and d2 functions

* Now d1 and d2 functions also take time and the user-definable args dictionary as arguments.
* This breaks compatibility with the previous format for d1 and d2 functions, but since the API for the stochastic module is explicitly documented as not being stable this is not a problem in my opinion.