Remove other instances of window when toggle would show it

This avoids a huge stack of windows when toggling two windows
alternately, e.g. the help dialog and logbook.
This way, there will always only be zero or one instances of that
window.