Fix console window (now not a QDialog)

It now opens and coloses as expected, depending on user
preferences and the status of the various processes involved.
Console window geometry and state are remembered between runs.