Added callbacks to the `run()` and `run_until()` functions (see #233)

see #233 ("Per-timestep user-defined operations")