Add callback argument to track completion of dump

This needs the COMPAT macro:

```c++
COMPAT(on_complete_callback.Dispose(),
       on_complete_callback.Reset());
```

(You could probably also write it as `on_complete_callback.COMPAT(Dispose, Reset)()`.)