PrefsWindow: Build window on demand.

The prefs window is not that often used. Keeping it in memory and
showing/hiding it is a bad idea in terms of memory usage.

We now build it and destroy it when required.