[Qt] Fix #1167 -- Qt crash bug when closing a window after menubar action
[Qt] Fix #1167 -- Qt crash bug when closing a window after menubar action

So the cleanup code I introduced in a commit back in December clears the menu
bar for a window by calling setMenuBar(None) on window close.  This helps
to clear up references quickly.  However, this didn't play nice with Qt
on Linux (bug #1167).  If you open a window from a QAction in the QMenuBar
(File -> Open or File -> Recently visited) and if that window goes modal
(say it prompts for a password or pops up a modal notification), AND
you close the first window, it would cause Qt to crash on Linux.

To fix this, we don't reparent the Menu Bar on the first Window to 'None',
but instead just clear its actions.

This fixes crash bug #1167 while still allowing for Python to GC/finalize the
Qt windows properly.

fyookball/electrum,fyookball/electrum,fyookball/electrum