Bitcoin-Qt: save and restore position of debug window

- move the code for saving and restoring window positions from BitcoinGUI
  to GUIUtil, make it more generic and also use it for saving/restoring
  debug window positions

We also could allow this for all other dialogs, if we want, but that is currently not the goal of this pull.