Allow setting a dump hook

If users want to be notified when a heap dump occurs, they can set this hook.
6 files changed