Clean things up when debugger buffer is killed

When debugger buffer is killed with C-x k the buffer is already
gone by the time we get to 'realgud-term-sentinel' and cleanup
didn't happen.

This patch adds kill-buffer-hook that cleans things up before
buffer is gone.