Bitcoin-Qt: prevent stuck/unusable debug window on exit

- when closing the client with an open debug window, that window could
  become stuck/unsuable (it was still shown wherea the main window was
  hidden already)
- fix this by hiding the debug window, when quitting the the client
Merge pull request #3056 from Diapolo/stuck_debug_window

Bitcoin-Qt: prevent stuck/unusable debug window on exit